mirror of
http://galexander.org/git/simplesshd.git
synced 2025-01-03 19:50:55 +00:00
And now my buttons have a background that is discernably different when
focused. (I cannot believe the default textAppearanceLarge didn't fit this bill, jeesh).
This commit is contained in:
parent
213a5808e3
commit
edd7bb4bbc
6
app/src/main/res/drawable/tv_button_bg.xml
Normal file
6
app/src/main/res/drawable/tv_button_bg.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_focused="true"
|
||||||
|
android:drawable="@drawable/tv_button_bg_focused" />
|
||||||
|
<item android:drawable="@drawable/tv_button_bg_normal" />
|
||||||
|
</selector>
|
8
app/src/main/res/drawable/tv_button_bg_focused.xml
Normal file
8
app/src/main/res/drawable/tv_button_bg_focused.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#f999" />
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<stroke android:color="#0000" android:width="3dp" />
|
||||||
|
</shape>
|
8
app/src/main/res/drawable/tv_button_bg_normal.xml
Normal file
8
app/src/main/res/drawable/tv_button_bg_normal.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#f333" />
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<stroke android:color="#0000" android:width="10dp" />
|
||||||
|
</shape>
|
@ -35,12 +35,12 @@
|
|||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:background="#ff000000"
|
android:background="#ff000000"
|
||||||
android:textColor="#ffffffff" />
|
android:textColor="#ffffffff" />
|
||||||
<Button android:id="@+id/startstop"
|
<Button style="@style/tv_button" android:id="@+id/startstop"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:text="Start"
|
android:text="Start"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:onClick="startstop_clicked" />
|
android:onClick="startstop_clicked" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -48,19 +48,19 @@
|
|||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent">
|
||||||
<Button style="@style/option_button" android:id="@+id/option1"
|
<Button style="@style/tv_button" android:id="@+id/option1"
|
||||||
android:text="Settings"
|
android:text="Settings"
|
||||||
android:onClick="settings_clicked" />
|
android:onClick="settings_clicked" />
|
||||||
<Button style="@style/option_button" android:id="@+id/option2"
|
<Button style="@style/tv_button" android:id="@+id/option2"
|
||||||
android:text="Copy App-private Path"
|
android:text="Copy App-private Path"
|
||||||
android:onClick="copypriv_clicked" />
|
android:onClick="copypriv_clicked" />
|
||||||
<Button style="@style/option_button" android:id="@+id/option3"
|
<Button style="@style/tv_button" android:id="@+id/option3"
|
||||||
android:text="Reset Keys"
|
android:text="Reset Keys"
|
||||||
android:onClick="resetkeys_clicked" />
|
android:onClick="resetkeys_clicked" />
|
||||||
<Button style="@style/option_button" android:id="@+id/option4"
|
<Button style="@style/tv_button" android:id="@+id/option4"
|
||||||
android:text="Documentation"
|
android:text="Documentation"
|
||||||
android:onClick="doc_clicked" />
|
android:onClick="doc_clicked" />
|
||||||
<Button style="@style/option_button" android:id="@+id/option5"
|
<Button style="@style/tv_button" android:id="@+id/option5"
|
||||||
android:text="About"
|
android:text="About"
|
||||||
android:onClick="about_clicked" />
|
android:onClick="about_clicked" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="option_button" parent="TextAppearance.Leanback">
|
<style name="tv_button" parent="TextAppearance.Leanback">
|
||||||
<item name="android:textAllCaps">false</item>
|
|
||||||
<item name="android:textSize">20sp</item>
|
|
||||||
<item name="android:layout_width">fill_parent</item>
|
<item name="android:layout_width">fill_parent</item>
|
||||||
<item name="android:layout_height">1dp</item>
|
<item name="android:layout_height">1dp</item>
|
||||||
<item name="android:layout_weight">1</item>
|
<item name="android:layout_weight">1</item>
|
||||||
|
<item name="android:layout_gravity">center</item>
|
||||||
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="android:textSize">20sp</item>
|
||||||
|
<item name="android:textColor">#ffff</item>
|
||||||
|
<item name="android:background">@drawable/tv_button_bg</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user