summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-07-02 00:48:22 +0800
committerZhao Wei Liew <zhaoweiliew@gmail.com>2016-07-27 17:47:24 +0800
commit9176a64ebcf2f59b01f0159ae129c56230b28cb6 (patch)
treee5232b3ed8b42bdb3d868ec2d582eae5066eb5d8
parent4aab309bc9b1b089423729d001d65e1ce6148859 (diff)
downloadpackages_apps_Settings-9176a64ebcf2f59b01f0159ae129c56230b28cb6.zip
packages_apps_Settings-9176a64ebcf2f59b01f0159ae129c56230b28cb6.tar.gz
packages_apps_Settings-9176a64ebcf2f59b01f0159ae129c56230b28cb6.tar.bz2
Settings: Improve vibrator intensity dialog layout
- Remove redundant 'Vibrator intensity' text - Align the text and seekbars - Get rid of the ScrollView - Clean up Visual: http://imgur.com/YB7Ez3m Change-Id: I4d80f7df2f18b580eaef1ca44ce0560e044ee065
-rw-r--r--res/layout/vibrator_intensity.xml69
-rw-r--r--res/values/cm_strings.xml2
2 files changed, 31 insertions, 40 deletions
diff --git a/res/layout/vibrator_intensity.xml b/res/layout/vibrator_intensity.xml
index dcbc676..171f90e 100644
--- a/res/layout/vibrator_intensity.xml
+++ b/res/layout/vibrator_intensity.xml
@@ -13,46 +13,37 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:paddingTop="24dp"
+ android:paddingBottom="24dp"
+ android:paddingEnd="24dp" >
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center_horizontal"
- android:paddingBottom="20dip">
+ <SeekBar
+ android:id="@*android:id/seekbar"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_alignParentStart="true"
+ android:layout_marginStart="8dp"
+ android:layout_toStartOf="@id/value" />
- <TextView android:id="@+id/text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/vibrator_intensity_title"
- android:paddingTop="10dip"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" />
- <TextView android:id="@+id/value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:paddingTop="10dip"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" />
- <SeekBar android:id="@*android:id/seekbar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/text"
- android:paddingTop="2dip"
- android:paddingLeft="20dip"
- android:paddingRight="20dip" />
+ <TextView
+ android:id="@+id/value"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_marginStart="4dp"
+ android:gravity="center_horizontal"
+ android:minEms="2" />
- <TextView
- android:id="@+id/warning_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@*android:id/seekbar"
- android:paddingTop="8dip"
- android:gravity="center"
- android:textSize="15dp" />
+ <TextView
+ android:id="@+id/warning_text"
+ android:layout_below="@*android:id/seekbar"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginStart="24dp"
+ android:layout_marginTop="24dp" />
- </RelativeLayout>
-</ScrollView>
+</RelativeLayout>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index cd091fd..cf5ad54 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -626,7 +626,7 @@
<!-- Hardware tunables - Vibrator intensity -->
<string name="vibrator_intensity_title">Vibrator intensity</string>
- <string name="vibrator_warning">Values higher than %1$d are not recommended</string>
+ <string name="vibrator_warning">Values higher than %1$d%% are not recommended</string>
<!-- Hardware tunables - Color calibration -->
<string name="color_calibration_title">Color calibration</string>