From 9ba296aa2c4f4c53652a519f4c71fb521095cbce Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Thu, 13 Jun 2019 18:07:22 -0700 Subject: [PATCH] [fenix] No issue: Remove flash of tab adapter updating data in create collection --- .../fenix/collections/CollectionCreationUIView.kt | 1 + .../res/layout/component_collection_creation.xml | 12 ++++++------ ...mponent_collection_creation_select_collection.xml | 12 ++++++------ app/src/main/res/values/dimens.xml | 1 + 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/collections/CollectionCreationUIView.kt b/app/src/main/java/org/mozilla/fenix/collections/CollectionCreationUIView.kt index 4f020fcb96..bf6d4799d1 100644 --- a/app/src/main/java/org/mozilla/fenix/collections/CollectionCreationUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/collections/CollectionCreationUIView.kt @@ -104,6 +104,7 @@ class CollectionCreationUIView( view.tab_list.run { adapter = collectionCreationTabListAdapter + itemAnimator = null layoutManager = LinearLayoutManager(container.context, RecyclerView.VERTICAL, true) } diff --git a/app/src/main/res/layout/component_collection_creation.xml b/app/src/main/res/layout/component_collection_creation.xml index 7b70032f6d..0774b507f8 100644 --- a/app/src/main/res/layout/component_collection_creation.xml +++ b/app/src/main/res/layout/component_collection_creation.xml @@ -43,9 +43,9 @@ android:id="@+id/collections_list" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="16dp" - android:layout_marginTop="16dp" - android:layout_marginEnd="16dp" + android:layout_marginStart="@dimen/component_collection_creation_list_margin" + android:layout_marginTop="@dimen/component_collection_creation_list_margin" + android:layout_marginEnd="@dimen/component_collection_creation_list_margin" android:visibility="gone" app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout" app:layout_constraintEnd_toEndOf="parent" @@ -78,9 +78,9 @@ android:id="@+id/tab_list" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="16dp" - android:layout_marginTop="16dp" - android:layout_marginEnd="16dp" + android:layout_marginStart="@dimen/component_collection_creation_list_margin" + android:layout_marginTop="@dimen/component_collection_creation_list_margin" + android:layout_marginEnd="@dimen/component_collection_creation_list_margin" app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/component_collection_creation_select_collection.xml b/app/src/main/res/layout/component_collection_creation_select_collection.xml index 2fdc8ba30f..ceef3ae8d6 100644 --- a/app/src/main/res/layout/component_collection_creation_select_collection.xml +++ b/app/src/main/res/layout/component_collection_creation_select_collection.xml @@ -45,9 +45,9 @@ android:id="@+id/collections_list" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="16dp" - android:layout_marginTop="16dp" - android:layout_marginEnd="16dp" + android:layout_marginStart="@dimen/component_collection_creation_list_margin" + android:layout_marginTop="@dimen/component_collection_creation_list_margin" + android:layout_marginEnd="@dimen/component_collection_creation_list_margin" app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -80,9 +80,9 @@ android:id="@+id/tab_list" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="16dp" - android:layout_marginTop="16dp" - android:layout_marginEnd="16dp" + android:layout_marginStart="@dimen/component_collection_creation_list_margin" + android:layout_marginTop="@dimen/component_collection_creation_list_margin" + android:layout_marginEnd="@dimen/component_collection_creation_list_margin" android:fadingEdgeLength="30dp" android:requiresFadingEdge="vertical" android:visibility="gone" diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 7573d4b193..15a8e75a9a 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -29,6 +29,7 @@ 14sp 18sp 56dp + 16dp 46dp