Curious view that simulates a terminal
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency
dependencies {
compile 'com.github.navasmdc:TerminalView:1.0'
}
In order to use this view you have to add this lines to your xml file
<com.gc.terminalview.TerminalView
android:id="@+id/terminal_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="7dp"/>
With
android:textSize
you can change the text size of the lines.
Add a line to the TerminalView
This function play a keyboard sound
terminalView.addLine(text);
// or with listener
terminalView.addLine(text,onLineWritedListener);
Add an error line to the TerminalView
This function play a keyboard sound
terminalView.addError(error);
// or with listener
terminalView.addError(text,onLineWritedListener);
Display a progress indicator
// Display the progress indicator
terminalView.showProgress();
// Hide the progress indicator
terminalView.hideProgress();