1
0
mirror of http://galexander.org/git/simplesshd.git synced 2025-01-01 10:40:56 +00:00

moved the options menu into the main_tv layout (non-functional).

This commit is contained in:
Greg Alexander 2019-09-21 15:41:09 -04:00
parent 51ca87cc18
commit f0cef36573
4 changed files with 96 additions and 1 deletions

8
NOTES
View File

@ -1005,8 +1005,16 @@ there's no three-dots menu button, so no way to get to Settings.
Anyways, there's a whole laundry list of things to do to get into the app Anyways, there's a whole laundry list of things to do to get into the app
store and to get shown in the regular launcher. store and to get shown in the regular launcher.
...
Luckily, even though the list of requirements is long, it is largely
irrelevant or redundant, so I'm just about there.
XXX - android TV support XXX - android TV support
- make buttons work
- doc should start a WebView instead of a URL??
- about shouldn't use Dialog??
XXX - figure out how to force a refresh on eink devices (onyx boox) when the password is displayed (Roman) XXX - figure out how to force a refresh on eink devices (onyx boox) when the password is displayed (Roman)

View File

@ -42,7 +42,7 @@ public class SimpleSSHD extends Activity
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
app_private = getFilesDir().toString(); app_private = getFilesDir().toString();
Prefs.init(this); Prefs.init(this);
setContentView(R.layout.main); setContentView(is_tv ? R.layout.main_tv : R.layout.main);
log_view = (EditText)findViewById(R.id.log); log_view = (EditText)findViewById(R.id.log);
startstop_view = (Button)findViewById(R.id.startstop); startstop_view = (Button)findViewById(R.id.startstop);
ip_view = (TextView)findViewById(R.id.ip); ip_view = (TextView)findViewById(R.id.ip);

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="27dp"
android:layout_marginBottom="27dp"
android:layout_marginLeft="48dp"
android:layout_marginRight="48dp"
android:background="#ff000000">
<LinearLayout
android:orientation="vertical"
android:layout_width="1dp"
android:layout_weight="4"
android:layout_height="fill_parent">
<TextView android:id="@+id/ip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:typeface="monospace"
android:background="#ff112266"
android:textColor="#ffffffff"
android:text="IP: XXX" />
<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:gravity="top"
android:singleLine="false"
android:background="#ff000000"
android:textColor="#ffffffff" />
<Button android:id="@+id/startstop"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Start"
android:textAppearance="?android:attr/textAppearanceLarge"
android:onClick="startstop_clicked" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="1dp"
android:layout_weight="1"
android:layout_height="fill_parent">
<Button
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Settings"
android:onClick="settings_clicked" />
<Button
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Copy App-private Path"
android:onClick="copypriv_clicked" />
<Button
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Reset Keys"
android:onClick="resetkeys_clicked" />
<Button
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Documentation"
android:onClick="doc_clicked" />
<Button
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="About"
android:onClick="about_clicked" />
</LinearLayout>
</LinearLayout>

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- NB: if you change this file, you should also change the right-hand
button list in res/layout/main_tv.xml -->
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/settings" <item android:id="@+id/settings"
android:icon="@android:drawable/ic_menu_manage" android:icon="@android:drawable/ic_menu_manage"