diff options
author | Mindy Pereira <mindyp@google.com> | 2012-05-14 10:54:32 -0700 |
---|---|---|
committer | Mindy Pereira <mindyp@google.com> | 2012-05-14 11:23:51 -0700 |
commit | c7f30687566db5b4d10dec1669f0cd72d00d6353 (patch) | |
tree | 70de8cecb9d1132c89db29d721895309d2fb6c59 /res | |
parent | 6fe5cfd583ec9f8ccf1b3bdb056b3d44481ef03f (diff) | |
download | android_packages_apps_ExactCalculator-c7f30687566db5b4d10dec1669f0cd72d00d6353.tar.gz android_packages_apps_ExactCalculator-c7f30687566db5b4d10dec1669f0cd72d00d6353.tar.bz2 android_packages_apps_ExactCalculator-c7f30687566db5b4d10dec1669f0cd72d00d6353.zip |
Calculator layout reworking to handle large text.
Fixes b/6468514 Numbers are cropped if using huge font size in Calculator
Change-Id: Ic054ac994484c39f1be759a1de6ebf2fc90091f3
Diffstat (limited to 'res')
-rw-r--r-- | res/layout-sw600dp-land/main.xml | 14 | ||||
-rw-r--r-- | res/layout-sw600dp/main.xml | 9 | ||||
-rw-r--r-- | res/values/styles.xml | 5 |
3 files changed, 16 insertions, 12 deletions
diff --git a/res/layout-sw600dp-land/main.xml b/res/layout-sw600dp-land/main.xml index 383cb36..3a86293 100644 --- a/res/layout-sw600dp-land/main.xml +++ b/res/layout-sw600dp-land/main.xml @@ -29,17 +29,17 @@ <LinearLayout android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" + android:layout_height="wrap_content" android:layout_marginBottom="@dimen/group_padding" android:background="@drawable/calculator_input_field"> <com.android.calculator2.CalculatorDisplay android:id="@+id/display" - android:layout_width="0dp" + android:layout_width="0dip" android:layout_weight="1" - android:layout_height="match_parent" + android:layout_height="wrap_content" maxDigits="@integer/max_digits" + android:layout_alignParentTop="true" > <com.android.calculator2.CalculatorEditText @@ -50,12 +50,14 @@ </com.android.calculator2.CalculatorDisplay> <FrameLayout - android:layout_width="100dip" - android:layout_height="match_parent"> + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentTop="true"> <Button android:id="@+id/clear" android:text="@string/clear" style="@style/btn_clear" + android:minWidth="100dp" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="5dip" diff --git a/res/layout-sw600dp/main.xml b/res/layout-sw600dp/main.xml index e21e30c..89df4de 100644 --- a/res/layout-sw600dp/main.xml +++ b/res/layout-sw600dp/main.xml @@ -29,8 +29,7 @@ android:paddingBottom="@dimen/top_bottom_padding"> <LinearLayout android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" + android:layout_height="wrap_content" android:layout_marginBottom="@dimen/group_padding" android:background="@drawable/calculator_input_field"> @@ -38,8 +37,9 @@ android:id="@+id/display" android:layout_width="0dp" android:layout_weight="1" - android:layout_height="match_parent" + android:layout_height="wrap_content" maxDigits="@integer/max_digits" + android:layout_gravity="bottom" > <com.android.calculator2.CalculatorEditText @@ -50,12 +50,13 @@ </com.android.calculator2.CalculatorDisplay> <FrameLayout - android:layout_width="100dip" + android:layout_width="wrap_content" android:layout_height="match_parent"> <Button android:id="@+id/clear" android:text="@string/clear" style="@style/btn_clear" + android:minWidth="100dp" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="5dip" diff --git a/res/values/styles.xml b/res/values/styles.xml index 3a5f228..cc9c3e0 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -41,13 +41,14 @@ <style name="display_style"> <item name="android:textSize">@dimen/display_text_size</item> <item name="android:inputType">text|textNoSuggestions</item> - <item name="android:gravity">right|center_vertical</item> + <item name="android:gravity">right|bottom</item> + <item name="android:layout_gravity">right|bottom</item> <item name="android:textColor">#ffffff</item> <item name="android:maxLines">1</item> <item name="android:scrollbars">none</item> <item name="android:scrollHorizontally">true</item> <item name="android:layout_width">match_parent</item> - <item name="android:layout_height">match_parent</item> + <item name="android:layout_height">wrap_content</item> <item name="android:paddingTop">8dp</item> <item name="android:paddingLeft">8dp</item> <item name="android:paddingRight">8dp</item> |