diff options
author | Kenny Root <kenny@the-b.org> | 2015-03-27 05:40:53 +0000 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2015-03-27 11:48:30 +0000 |
commit | ada9571134b5d061206c4b7fa7d76a770ec9d419 (patch) | |
tree | 66004c1ada0379cb877e19013082c6cff237e96d /res/layout | |
parent | aed1495fee8fc4205e44a8e264a340be597215f1 (diff) | |
download | connectbot-ada9571134b5d061206c4b7fa7d76a770ec9d419.tar.gz connectbot-ada9571134b5d061206c4b7fa7d76a770ec9d419.tar.bz2 connectbot-ada9571134b5d061206c4b7fa7d76a770ec9d419.zip |
Make the color picker scale with display density
The UberColorPickerDialog was written when there was only one display
density (mdpi). Scale all of the values appropriately for modern
multi-density displays.
Fixes #64
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/act_colors.xml | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/res/layout/act_colors.xml b/res/layout/act_colors.xml index 625437d..dfb6082 100644 --- a/res/layout/act_colors.xml +++ b/res/layout/act_colors.xml @@ -23,36 +23,35 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> - <TextView - android:text="@string/colors_fg" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:id="@+id/fg_label" - android:paddingTop="12dp" - /> - - <Spinner - android:id="@+id/fg" - android:layout_width="wrap_content" + <LinearLayout + android:orientation="horizontal" + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_toRightOf="@+id/fg_label" - /> + android:id="@+id/spinners"> - <Spinner - android:id="@+id/bg" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignTop="@+id/fg" - android:layout_alignParentRight="true" - /> + <Spinner + android:id="@+id/fg" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:minHeight="60dp" + android:layout_weight="1" + android:gravity="center" + /> - <TextView - android:text="@string/color_bg" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_toLeftOf="@+id/bg" - android:paddingTop="12dp" - /> + <Spinner + android:id="@+id/bg" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_alignTop="@id/fg" + android:layout_alignParentRight="true" + android:layout_toRightOf="@id/fg" + android:layout_alignParentStart="true" + android:minHeight="60dp" + android:layout_weight="1" + android:gravity="center" + /> + </LinearLayout> <GridView android:id="@+id/color_grid" @@ -65,7 +64,8 @@ android:columnWidth="60dp" android:stretchMode="columnWidth" android:gravity="center" - android:layout_below="@+id/fg" - android:stackFromBottom="true" android:minHeight="60dp"/> + android:minHeight="60dp" + android:layout_below="@+id/spinners" + /> </RelativeLayout> |