Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ce806d8 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Fix scrolling position not kept in Trusted Credentials

For example when changing display states.

Save view states to solve this issue.
 - Save current tab. (System / User)
 - Save group expanded state. (Personal / Work)
 - Save scrolling position of each group.

Also updated to ViewPager2 and updated the styles.

Bug: 204839552
Test: manual
Change-Id: Ibeda50b50e7dfd2ba071b75fe2aa88ef560f4c88
parent fbafdbdd
Loading
Loading
Loading
Loading
+15 −67
Original line number Diff line number Diff line
@@ -13,78 +13,26 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<TabHost
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">

            <FrameLayout
                android:id="@+id/system_tab"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">

    <ProgressBar
                    android:id="@+id/system_progress"
        android:id="@+id/progress"
        style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
                    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
                    android:visibility="gone" />

                <LinearLayout
                    android:id="@+id/system_content"
                    android:orientation="vertical"
        android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:visibility="gone"
                    android:animateLayoutChanges="true">
                </LinearLayout>

            </FrameLayout>

            <FrameLayout
                android:id="@+id/user_tab"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">

                <ProgressBar
                    android:id="@+id/user_progress"
                    style="?android:attr/progressBarStyleLarge"
                    android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
        android:visibility="gone"/>

    <LinearLayout
                    android:id="@+id/user_content"
        android:id="@+id/content"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
                    android:visibility="gone"
                    android:animateLayoutChanges="true">
        android:visibility="gone">
    </LinearLayout>

</FrameLayout>
 No newline at end of file

        </FrameLayout>

    </LinearLayout>

</TabHost>
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ import android.widget.Spinner;
import androidx.appcompat.app.AlertDialog;

import com.android.internal.widget.LockPatternUtils;
import com.android.settings.TrustedCredentialsSettings.CertHolder;
import com.android.settings.TrustedCredentialsFragment.CertHolder;
import com.android.settingslib.RestrictedLockUtils;

import java.security.cert.X509Certificate;
+1030 −0

File added.

Preview size limit exceeded, changes collapsed.

+69 −966

File changed.

Preview size limit exceeded, changes collapsed.