Prevent RecyclerView from loading everything

Fixes #1360
Fixes #1303
Fixes #1280
nightly-build-test
Jeff Boek 5 years ago
parent 0bcad0d364
commit 65a210ec64

@ -6,7 +6,7 @@ package org.mozilla.fenix.library.history
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.widget.NestedScrollView import android.widget.LinearLayout
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.Observer import io.reactivex.Observer
@ -27,7 +27,7 @@ class HistoryUIView(
var mode: HistoryState.Mode = HistoryState.Mode.Normal var mode: HistoryState.Mode = HistoryState.Mode.Normal
private set 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) .inflate(R.layout.component_history, container, true)
.findViewById(R.id.history_wrapper) .findViewById(R.id.history_wrapper)

@ -3,16 +3,13 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.core.widget.NestedScrollView
android:id="@+id/history_wrapper"
android:layout_height="wrap_content"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/history_wrapper"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout
android:id="@+id/delete_history_button" android:id="@+id/delete_history_button"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:background="@drawable/button_background" android:background="@drawable/button_background"
@ -39,6 +36,5 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/history_list" android:id="@+id/history_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView>

Loading…
Cancel
Save