Как избежать отставания в просмотре прокрутки и повторного просмотра внутри фрагмента (после состояния паузы)? - PullRequest
0 голосов
/ 06 мая 2019

Фрагмент продолжает загружаться в framelayout.Прокрутка внутри фрагментов запаздывает в случае определенной активности.Но это хорошо в другой деятельности.Это нормально для последних устройств с большим объемом памяти, но с задержкой при включении после паузы.В чем может быть проблема?Вот мои коды

Я попытался высвободить часть памяти, убив службы, избавившись от скольжения и стерев всю тяжелую функциональность с onBindViewHolder.Но это не сработало.

        <activity
            android:name=".ui.main.base.MainActivity"
            android:label="@string/title_activity_main"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:launchMode="singleInstance"

            android:windowSoftInputMode="adjustPan" >



            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>



     <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/blue"
    tools:context="com.andmine.bhatbhate.ui.main.base.MainActivity">

    <include layout="@layout/appbar" />

    <FrameLayout
        android:id="@+id/fragment_container_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/light_blue"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        tools:showIn="@layout/activity_main" />


    <com.andmine.bhatbhate.ui.customsviews.ExtendedBottomNavigationView
        android:id="@+id/bottom_navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        app:itemBackground="@drawable/linemenu"
        app:itemIconTint="@drawable/bottom_bar_color_chooser"
        app:itemTextColor="@drawable/bottom_bar_color_chooser"
        app:menu="@menu/bottom_navigation_main"
app:layout_behavior=""        />


</android.support.design.widget.CoordinatorLayout>
...