ConfigActivity: Make the two-pane layout more readable
Highlight the selected configuration, and add a border between the two panes. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
76eb65d7d5
commit
9e36e0d9c6
5
app/src/main/res/drawable/list_item_background.xml
Normal file
5
app/src/main/res/drawable/list_item_background.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@color/list_item_activated" android:state_activated="true" />
|
||||||
|
<item android:drawable="@android:color/transparent" />
|
||||||
|
</selector>
|
5
app/src/main/res/drawable/list_item_background_anim.xml
Normal file
5
app/src/main/res/drawable/list_item_background_anim.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="@color/list_item_ripple">
|
||||||
|
<item android:drawable="@drawable/list_item_background" />
|
||||||
|
</ripple>
|
@ -17,5 +17,8 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
|
android:background="?android:attr/colorPrimary"
|
||||||
|
android:paddingEnd="0dp"
|
||||||
|
android:paddingStart="4dp"
|
||||||
tools:ignore="InconsistentLayout" />
|
tools:ignore="InconsistentLayout" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="?android:attr/colorBackground">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="?android:attr/colorBackground">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/list_item_background_anim"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="?android:attr/colorBackground"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/placeholder_text" />
|
android:text="@string/placeholder_text" />
|
||||||
|
5
app/src/main/res/values/colors.xml
Normal file
5
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="list_item_activated">#cfd8dc</color> <!-- Blue Grey 200 -->
|
||||||
|
<color name="list_item_ripple">#808e95</color> <!-- Blue Grey 200 dark -->
|
||||||
|
</resources>
|
Loading…
Reference in New Issue
Block a user