From c9bad3209de463dd07d65777dc1ecc5cd43e4b45 Mon Sep 17 00:00:00 2001 From: Jeff Boek Date: Thu, 4 Apr 2019 16:55:18 -0700 Subject: [PATCH] [fenix] Prevent RecyclerView from loading everything Fixes https://github.com/mozilla-mobile/fenix/issues/1360 Fixes https://github.com/mozilla-mobile/fenix/issues/1303 Fixes https://github.com/mozilla-mobile/fenix/issues/1280 --- .../fenix/library/history/HistoryUIView.kt | 4 +- app/src/main/res/layout/component_history.xml | 64 +++++++++---------- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/library/history/HistoryUIView.kt b/app/src/main/java/org/mozilla/fenix/library/history/HistoryUIView.kt index 120481df08..d174236711 100644 --- a/app/src/main/java/org/mozilla/fenix/library/history/HistoryUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/library/history/HistoryUIView.kt @@ -6,7 +6,7 @@ package org.mozilla.fenix.library.history import android.view.LayoutInflater import android.view.ViewGroup -import androidx.core.widget.NestedScrollView +import android.widget.LinearLayout import androidx.recyclerview.widget.LinearLayoutManager import io.reactivex.Observable import io.reactivex.Observer @@ -27,7 +27,7 @@ class HistoryUIView( var mode: HistoryState.Mode = HistoryState.Mode.Normal private set - override val view: NestedScrollView = LayoutInflater.from(container.context) + override val view: LinearLayout = LayoutInflater.from(container.context) .inflate(R.layout.component_history, container, true) .findViewById(R.id.history_wrapper) diff --git a/app/src/main/res/layout/component_history.xml b/app/src/main/res/layout/component_history.xml index aefb1be8c2..7c5382621c 100644 --- a/app/src/main/res/layout/component_history.xml +++ b/app/src/main/res/layout/component_history.xml @@ -3,42 +3,38 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - + - + android:layout_height="wrap_content"> - - - - - + android:layout_height="wrap_content" + android:text="@string/history_delete_all" + android:textColor="?attr/deleteColor" + android:drawablePadding="8dp" + android:textSize="16sp" + android:gravity="center" + android:clickable="false" + android:focusable="false" + android:layout_gravity="center" /> + + +