diff options
author | Annie Chin <afchin@google.com> | 2016-12-01 15:07:34 -0800 |
---|---|---|
committer | Annie Chin <afchin@google.com> | 2016-12-05 15:26:29 -0800 |
commit | 36147983cb821ede03f569a562133a08cac9bcdf (patch) | |
tree | 42a6ee6c24925d1cb059798bc6f63ec4d17283f9 /res | |
parent | f1c92ca966b0ad3cd52c50160117e33706f2a361 (diff) | |
download | ExactCalculator-36147983cb821ede03f569a562133a08cac9bcdf.tar.gz |
Implement grouped headers.
Fixes: 32943152
Fixes: 33203390
Fixes: 33105914
-Add divider
-Adjust padding to better match spec
-Make HistoryFormula/Result padding match DisplayFormula/Result padding
Change-Id: I5e5a7e61079b6d1367bf61f4c88dd79555f4bcb7
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/empty_history_view.xml | 3 | ||||
-rw-r--r-- | res/layout/fragment_history.xml | 2 | ||||
-rw-r--r-- | res/layout/history_item.xml | 17 | ||||
-rw-r--r-- | res/values/dimens.xml | 4 | ||||
-rw-r--r-- | res/values/styles.xml | 5 |
5 files changed, 22 insertions, 9 deletions
diff --git a/res/layout/empty_history_view.xml b/res/layout/empty_history_view.xml index cd5b759..7814b52 100644 --- a/res/layout/empty_history_view.xml +++ b/res/layout/empty_history_view.xml @@ -18,8 +18,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/empty_history_view" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/empty_history_color"> + android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" diff --git a/res/layout/fragment_history.xml b/res/layout/fragment_history.xml index c8c0bc8..0d8ed9b 100644 --- a/res/layout/fragment_history.xml +++ b/res/layout/fragment_history.xml @@ -40,6 +40,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" + android:clipToPadding="false" + android:paddingBottom="@dimen/history_divider_padding" app:layoutManager="LinearLayoutManager" app:reverseLayout="true" /> </LinearLayout> diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml index 3baaf73..eaa95ad 100644 --- a/res/layout/history_item.xml +++ b/res/layout/history_item.xml @@ -19,16 +19,27 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" + android:paddingTop="@dimen/history_divider_padding" android:clipChildren="false" + android:clipToPadding="false" android:orientation="vertical"> + <View + android:id="@+id/history_divider" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/history_divider_padding" + android:layout_marginBottom="@dimen/history_divider_padding" + android:background="?android:attr/listDivider" + android:importantForAccessibility="no" /> + <TextView android:id="@+id/history_date" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:fontFamily="sans-serif-medium" - android:paddingStart="@dimen/history_item_text_padding_start" - android:paddingEnd="@dimen/history_item_text_padding_end" + android:paddingStart="@dimen/result_padding_start" + android:paddingEnd="@dimen/result_padding_end" android:text="@string/title_current_expression" android:textColor="?android:attr/colorAccent" android:textSize="14dp" /> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 9de65d5..225cde3 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -20,9 +20,9 @@ <!-- The margin between the pad pages when displayed using a view pager. --> <dimen name="pad_page_margin">24dip</dimen> + <dimen name="history_divider_padding">14dip</dimen> + <dimen name="history_item_text_padding_top">8dip</dimen> <dimen name="history_item_text_padding_bottom">16dip</dimen> - <dimen name="history_item_text_padding_start">16dip</dimen> - <dimen name="history_item_text_padding_end">24dip</dimen> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index 773c5a8..9e45a75 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -49,8 +49,9 @@ <item name="android:layout_gravity">bottom|end</item> <item name="android:paddingTop">@dimen/history_item_text_padding_top</item> <item name="android:paddingBottom">@dimen/history_item_text_padding_bottom</item> - <item name="android:paddingStart">@dimen/history_item_text_padding_start</item> - <item name="android:paddingEnd">@dimen/history_item_text_padding_end</item> + <!-- Note: result_padding_start == formula_padding_start. --> + <item name="android:paddingStart">@dimen/result_padding_start</item> + <item name="android:paddingEnd">@dimen/result_padding_end</item> <item name="android:textSize">@dimen/result_textsize</item> </style> |