summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorClark Scheff <clark@cyngn.com>2014-07-30 12:42:49 -0700
committerd34d <clark@cyngn.com>2014-07-31 08:23:58 -0700
commita57f57af18b5ababbf41dc8c52b96c63928b3d4f (patch)
treec94ab8f3778b55a78fff6eadf22e0d997321d498 /res/layout
parent69c8e30d7bf528e37cc00e3855ca613c5f259ed7 (diff)
downloadpackages_apps_ThemeChooser-a57f57af18b5ababbf41dc8c52b96c63928b3d4f.zip
packages_apps_ThemeChooser-a57f57af18b5ababbf41dc8c52b96c63928b3d4f.tar.gz
packages_apps_ThemeChooser-a57f57af18b5ababbf41dc8c52b96c63928b3d4f.tar.bz2
Remove the final RelativeLayout from fragment_pager_list
With the switch to a LinearLayout we must give the additional cards a negative margin. This allows them to be positioned below the navbar card. This is done because previously the title card was being set to View.GONE and this caused the additional cards to abruptly move up when the title card changes to GONE. By setting it to View.INVISIBLE and using a negative margin we can get a smooth animation and not lose any functionality in the process. Change-Id: Ifbbf67f3e301a26fa3d30ef79a3a07416fba5837
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/fragment_pager_list.xml112
1 files changed, 56 insertions, 56 deletions
diff --git a/res/layout/fragment_pager_list.xml b/res/layout/fragment_pager_list.xml
index d84c5bf..31e1ca0 100644
--- a/res/layout/fragment_pager_list.xml
+++ b/res/layout/fragment_pager_list.xml
@@ -16,8 +16,9 @@
android:scrollbars="none"
android:fillViewport="true"
android:drawSelectorOnTop="false">
- <RelativeLayout
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/shadow_frame"
@@ -49,6 +50,57 @@
android:background="@android:color/white"/>
</FrameLayout>
+ <!-- Title card -->
+ <FrameLayout
+ android:id="@+id/title_card"
+ android:layout_width="@dimen/theme_preview_width"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:background="@drawable/card_themepreview_bg">
+ <LinearLayout
+ android:id="@+id/title_layout"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/title_card_height"
+ android:alpha="0">
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:layout_marginStart="16dp"
+ android:gravity="center_vertical"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:textColor="#78000000"/>
+
+ <ImageView
+ android:id="@+id/apply"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginRight="16dp"
+ android:src="@drawable/ic_theme_apply2"/>
+
+ <ImageView
+ android:id="@+id/overflow"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginRight="8dp"
+ android:src="@drawable/ic_overflow_dark"/>
+ </LinearLayout>
+ <ProgressBar
+ android:id="@+id/apply_progress"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical|right"
+ android:padding="@dimen/apply_progress_padding"
+ android:indeterminate="false"
+ android:max="100"
+ android:progress="0"
+ android:progressDrawable="@drawable/apply_progress_bar"
+ android:visibility="gone"
+ style="@android:style/Widget.ProgressBar.Horizontal"/>
+ </FrameLayout>
+
<!-- Each card in this layout should have a Space below it
with one final Space for devices that have a navbar -->
<LinearLayout
@@ -56,8 +108,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:layout_below="@id/shadow_frame"
- android:layout_marginTop="@dimen/expanded_card_margin_top"
+ android:layout_marginTop="@dimen/additional_cards_margin_top"
android:visibility="invisible">
<com.cyngn.theme.chooser.WallpaperCardView
android:id="@+id/wallpaper_card"
@@ -72,7 +123,6 @@
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="@dimen/wallpaper_card_height"
- android:layout_below="@id/wallpaper_card"
themes:labelText="@string/lockscreen_label"
/>
<Space android:layout_width="match_parent"
@@ -103,56 +153,6 @@
android:layout_width="match_parent"
android:layout_height="@*android:dimen/system_bar_height" />
</LinearLayout>
- <FrameLayout
- android:id="@+id/title_card"
- android:layout_width="@dimen/theme_preview_width"
- android:layout_height="wrap_content"
- android:layout_below="@id/shadow_frame"
- android:layout_centerHorizontal="true"
- android:background="@drawable/card_themepreview_bg">
- <LinearLayout
- android:id="@+id/title_layout"
- android:layout_width="match_parent"
- android:layout_height="@dimen/title_card_height"
- android:alpha="0">
- <TextView
- android:id="@+id/title"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:layout_marginStart="16dp"
- android:gravity="center_vertical"
- android:ellipsize="end"
- android:singleLine="true"
- android:textColor="#78000000"/>
-
- <ImageView
- android:id="@+id/apply"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginRight="16dp"
- android:src="@drawable/ic_theme_apply2"/>
-
- <ImageView
- android:id="@+id/overflow"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginRight="8dp"
- android:src="@drawable/ic_overflow_dark"/>
- </LinearLayout>
- <ProgressBar
- android:id="@+id/apply_progress"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical|right"
- android:padding="@dimen/apply_progress_padding"
- android:indeterminate="false"
- android:max="100"
- android:progress="0"
- android:progressDrawable="@drawable/apply_progress_bar"
- android:visibility="gone"
- style="@android:style/Widget.ProgressBar.Horizontal"/>
- </FrameLayout>
- </RelativeLayout>
+ </LinearLayout>
</ScrollView>
</LinearLayout> \ No newline at end of file