Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342093 )

Change subject: Improve scrolling behavior of AddToReadingListDialog.
......................................................................

Improve scrolling behavior of AddToReadingListDialog.

This rearranges some elements in the dialog into a NestedScrollView, so
that the top header (the "Save to reading list" message) remains fixed,
but everything else scrolls.

Bug: T159339
Change-Id: I0833a758a7c3a2ee8656e8d0acff2c7d0d0751ba
---
M app/src/main/res/layout/dialog_add_to_reading_list.xml
1 file changed, 73 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/93/342093/1

diff --git a/app/src/main/res/layout/dialog_add_to_reading_list.xml 
b/app/src/main/res/layout/dialog_add_to_reading_list.xml
index 7a0a6ea..167e007 100644
--- a/app/src/main/res/layout/dialog_add_to_reading_list.xml
+++ b/app/src/main/res/layout/dialog_add_to_reading_list.xml
@@ -3,89 +3,93 @@
     xmlns:android="http://schemas.android.com/apk/res/android";
     xmlns:app="http://schemas.android.com/apk/res-auto";
     android:layout_width="match_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    android:background="@color/base50">
 
     <LinearLayout
-        android:id="@+id/lists_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="vertical"
+        android:background="?attr/link_preview_background_color">
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="48dp"
+            android:paddingLeft="@dimen/list_item_horizontal_padding"
+            android:paddingRight="@dimen/list_item_horizontal_padding"
+            android:layout_weight="1"
+            android:layout_marginTop="8dp"
+            android:layout_marginBottom="8dp"
+            android:gravity="center_vertical"
+            style="@style/RtlAwareTextView"
+            android:textColor="?attr/link_preview_text_color"
+            android:textSize="18sp"
+            android:text="@string/reading_list_save_to" />
+
+        <ImageView
+            style="@style/Widget.AppCompat.ImageButton"
+            android:id="@+id/close_button"
+            android:layout_width="48dp"
+            android:layout_height="48dp"
+            android:layout_gravity="center_vertical"
+            android:background="?attr/selectableItemBackgroundBorderless"
+            android:tint="?attr/link_preview_text_color"
+            app:srcCompat="@drawable/ic_close_white_24dp"
+            android:contentDescription="@string/dialog_close_description"/>
+    </LinearLayout>
+
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="64.5dp"
         android:background="?attr/link_preview_background_color">
 
         <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-            <TextView
-                android:layout_width="0dp"
-                android:layout_height="48dp"
-                android:paddingLeft="@dimen/list_item_horizontal_padding"
-                android:paddingRight="@dimen/list_item_horizontal_padding"
-                android:layout_weight="1"
-                android:layout_marginTop="8dp"
-                android:layout_marginBottom="8dp"
-                android:gravity="center_vertical"
-                style="@style/RtlAwareTextView"
-                android:textColor="?attr/link_preview_text_color"
-                android:textSize="18sp"
-                android:text="@string/reading_list_save_to" />
-
-            <ImageView
-                style="@style/Widget.AppCompat.ImageButton"
-                android:id="@+id/close_button"
-                android:layout_width="48dp"
-                android:layout_height="48dp"
-                android:layout_gravity="center_vertical"
-                android:background="?attr/selectableItemBackgroundBorderless"
-                android:tint="?attr/link_preview_text_color"
-                app:srcCompat="@drawable/ic_close_white_24dp"
-                android:contentDescription="@string/dialog_close_description"/>
-        </LinearLayout>
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:background="@color/list_separator_light"/>
-
-        <LinearLayout
-            android:id="@+id/create_button"
+            android:id="@+id/lists_container"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:paddingTop="16dp"
-            android:paddingBottom="16dp"
-            android:paddingLeft="@dimen/list_item_horizontal_padding"
-            android:paddingRight="@dimen/list_item_horizontal_padding"
-            android:background="?attr/selectableItemBackground"
-            android:clickable="true">
+            android:orientation="vertical">
 
-            <ImageView
-                android:layout_width="@dimen/readingListItemSize"
-                android:layout_height="@dimen/readingListItemSize"
-                android:layout_marginRight="16dp"
-                android:layout_marginEnd="16dp"
-                android:padding="10dp"
-                android:layout_gravity="center_vertical"
-                android:background="@drawable/button_shape_add_reading_list"
-                app:srcCompat="@drawable/ic_add_gray_24dp"
-                android:contentDescription="@null"/>
-
-            <TextView
+            <LinearLayout
+                android:id="@+id/create_button"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                style="@style/RtlAwareTextView"
-                android:textColor="?attr/link_preview_text_color"
-                android:textSize="16sp"
-                android:fontFamily="sans-serif-medium"
-                android:text="@string/reading_list_create_new" />
+                android:paddingTop="16dp"
+                android:paddingBottom="16dp"
+                android:paddingLeft="@dimen/list_item_horizontal_padding"
+                android:paddingRight="@dimen/list_item_horizontal_padding"
+                android:background="?attr/selectableItemBackground"
+                android:clickable="true">
+
+                <ImageView
+                    android:layout_width="@dimen/readingListItemSize"
+                    android:layout_height="@dimen/readingListItemSize"
+                    android:layout_marginRight="16dp"
+                    android:layout_marginEnd="16dp"
+                    android:padding="10dp"
+                    android:layout_gravity="center_vertical"
+                    
android:background="@drawable/button_shape_add_reading_list"
+                    app:srcCompat="@drawable/ic_add_gray_24dp"
+                    android:contentDescription="@null"/>
+
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    style="@style/RtlAwareTextView"
+                    android:textColor="?attr/link_preview_text_color"
+                    android:textSize="16sp"
+                    android:fontFamily="sans-serif-medium"
+                    android:text="@string/reading_list_create_new" />
+            </LinearLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/list_of_lists"
+                android:scrollbars="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
         </LinearLayout>
 
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/list_of_lists"
-            android:scrollbars="vertical"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
-
-    </LinearLayout>
+    </android.support.v4.widget.NestedScrollView>
 
     <include
         android:id="@+id/onboarding_container"

-- 
To view, visit https://gerrit.wikimedia.org/r/342093
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0833a758a7c3a2ee8656e8d0acff2c7d0d0751ba
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <dbr...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to