diff options
author | d34d <clark@cyngn.com> | 2014-08-28 23:17:38 -0700 |
---|---|---|
committer | d34d <clark@cyngn.com> | 2014-08-28 23:17:38 -0700 |
commit | cb95d19cc673d326402806e512af9cb10d1037ac (patch) | |
tree | eacb4f42916f0cd82c99c080bd7595099f0254fc /res | |
parent | b6ea86a140a2b7bbc9abe0de574c4c5d0ad96e5d (diff) | |
download | packages_apps_ThemeChooser-cb95d19cc673d326402806e512af9cb10d1037ac.zip packages_apps_ThemeChooser-cb95d19cc673d326402806e512af9cb10d1037ac.tar.gz packages_apps_ThemeChooser-cb95d19cc673d326402806e512af9cb10d1037ac.tar.bz2 |
Use NavBarSpace for padding the bottom of some layouts
We've used Space in enough layouts that it makes sense to create
a view that can take care of all the logic regarding padding the
bottom of layouts so content goes above the navigation bar. This
view simply sets the height to 0 in onMeasure() when no navigation
bar is detected. It leaves the height to whatever the super class
had set it to when there is a navigation bar.
Change-Id: I908c6a8a01ba4f761335909e9ecfb48a8a3007d2
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/component_selector.xml | 5 | ||||
-rw-r--r-- | res/layout/fragment_pager_list.xml | 6 | ||||
-rw-r--r-- | res/layout/save_apply_button.xml | 4 | ||||
-rw-r--r-- | res/layout/shop_themes.xml | 4 |
4 files changed, 7 insertions, 12 deletions
diff --git a/res/layout/component_selector.xml b/res/layout/component_selector.xml index 0ef1e42..ef54a89 100644 --- a/res/layout/component_selector.xml +++ b/res/layout/component_selector.xml @@ -35,10 +35,7 @@ themes:fillColor="@android:color/white"/> </FrameLayout> - - <!-- This view will be set to gone if the device does not have a navigation bar --> - <Space - android:id="@+id/navbar_padding" + <com.cyngn.theme.widget.NavBarSpace android:layout_width="match_parent" android:layout_height="@*android:dimen/system_bar_height"/> </com.cyngn.theme.chooser.ComponentSelector>
\ No newline at end of file diff --git a/res/layout/fragment_pager_list.xml b/res/layout/fragment_pager_list.xml index 6886391..b0c212b 100644 --- a/res/layout/fragment_pager_list.xml +++ b/res/layout/fragment_pager_list.xml @@ -162,9 +162,9 @@ <Space android:layout_width="match_parent" android:layout_height="@dimen/expanded_card_margin_top" /> - <Space android:id="@+id/nav_bar_spacer" - android:layout_width="match_parent" - android:layout_height="@*android:dimen/system_bar_height" /> + <com.cyngn.theme.widget.NavBarSpace + android:layout_width="match_parent" + android:layout_height="@*android:dimen/system_bar_height" /> </LinearLayout> </LinearLayout> </com.cyngn.theme.widget.LockableScrollView> diff --git a/res/layout/save_apply_button.xml b/res/layout/save_apply_button.xml index 70d3b18..14ef286 100644 --- a/res/layout/save_apply_button.xml +++ b/res/layout/save_apply_button.xml @@ -29,8 +29,8 @@ android:background="@drawable/save_apply_button_selector"/> </LinearLayout> - <Space - android:id="@+id/navbar_padding" + + <com.cyngn.theme.widget.NavBarSpace android:layout_width="match_parent" android:layout_height="@*android:dimen/system_bar_height"/> diff --git a/res/layout/shop_themes.xml b/res/layout/shop_themes.xml index 90ffec1..727741f 100644 --- a/res/layout/shop_themes.xml +++ b/res/layout/shop_themes.xml @@ -26,9 +26,7 @@ android:focusable="true" android:background="@drawable/shop_themes_bg"/> - <!-- This view will be set to gone if the device does not have a navigation bar --> - <Space - android:id="@+id/navbar_padding" + <com.cyngn.theme.widget.NavBarSpace android:layout_width="match_parent" android:layout_height="@*android:dimen/system_bar_height"/> </LinearLayout>
\ No newline at end of file |