mirror of
http://galexander.org/git/simplesshd.git
synced 2024-12-28 17:08:08 +00:00
make the log view always show the bottom of the log
This commit is contained in:
parent
4581a224ac
commit
52a1093dde
@ -3,14 +3,17 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<TextView android:id="@+id/log"
|
||||
<EditText android:id="@+id/log"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="start"
|
||||
android:editable="false"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:typeface="monospace"
|
||||
android:singleLine="false" />
|
||||
android:gravity="top"
|
||||
android:singleLine="false"
|
||||
android:background="#00000000" />
|
||||
<Button android:id="@+id/startstop"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -19,7 +19,7 @@ import java.io.BufferedReader;
|
||||
|
||||
public class SimpleSSHD extends Activity
|
||||
{
|
||||
private TextView log_view;
|
||||
private EditText log_view;
|
||||
private Button startstop_view;
|
||||
public static SimpleSSHD curr = null;
|
||||
private UpdaterThread updater = null;
|
||||
@ -28,7 +28,7 @@ public class SimpleSSHD extends Activity
|
||||
super.onCreate(savedInstanceState);
|
||||
Prefs.init(this);
|
||||
setContentView(R.layout.main);
|
||||
log_view = (TextView)findViewById(R.id.log);
|
||||
log_view = (EditText)findViewById(R.id.log);
|
||||
startstop_view = (Button)findViewById(R.id.startstop);
|
||||
}
|
||||
|
||||
@ -116,5 +116,6 @@ public class SimpleSSHD extends Activity
|
||||
i %= lines.length;
|
||||
} while (i != curr_line);
|
||||
log_view.setText(output);
|
||||
log_view.setSelection(output.length());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user