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

Commit f039b69a authored by Santiago Etchebehere's avatar Santiago Etchebehere
Browse files

Fix crash on rotation and tweak landscape layout

Error and loading views were missing from the landscape
layout causing it to crash, also tweak the landscape layout
for improved UI.

Bug: 134529293
Change-Id: I53d08b6c165b4b3311c98475356f68e7a9a37df0
parent 41156e63
Loading
Loading
Loading
Loading
+62 −33
Original line number Diff line number Diff line
@@ -23,7 +23,12 @@
    android:background="?android:colorPrimary">
    <include layout="@layout/section_header"/>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:id="@+id/content_section"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal">
@@ -65,4 +70,28 @@

            </LinearLayout>
        </LinearLayout>
        <androidx.core.widget.ContentLoadingProgressBar
            android:id="@+id/loading_indicator"
            style="@android:style/Widget.DeviceDefault.ProgressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="200dp"
            android:layout_gravity="center_horizontal|top"
            android:indeterminate="true"/>

        <FrameLayout
            android:id="@+id/error_section"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone">
            <TextView
                android:id="@+id/error_message"
                style="@style/HeaderTextAppearance"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/something_went_wrong"/>
        </FrameLayout>
    </FrameLayout>
</LinearLayout>
+31 −1
Original line number Diff line number Diff line
@@ -21,7 +21,13 @@
    android:orientation="vertical"
    android:background="?android:colorPrimary">
    <include layout="@layout/section_header"/>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
        android:id="@+id/content_section"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">
@@ -62,4 +68,28 @@

        </LinearLayout>
    </LinearLayout>
        <androidx.core.widget.ContentLoadingProgressBar
            android:id="@+id/loading_indicator"
            style="@android:style/Widget.DeviceDefault.ProgressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="200dp"
            android:layout_gravity="center_horizontal|top"
            android:indeterminate="true"/>

        <FrameLayout
            android:id="@+id/error_section"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone">
            <TextView
                android:id="@+id/error_message"
                style="@style/HeaderTextAppearance"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/something_went_wrong"/>
        </FrameLayout>
    </FrameLayout>
</LinearLayout>
+77 −44
Original line number Diff line number Diff line
@@ -22,7 +22,11 @@
    android:background="?android:colorPrimary">
    <include layout="@layout/section_header"/>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:id="@+id/content_section"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal">
@@ -33,7 +37,10 @@
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/secondary_color"/>

            <View
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:background="@color/divider_color"/>
            <LinearLayout
                android:id="@+id/options_section"
                android:layout_width="0dp"
@@ -51,6 +58,7 @@
                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@null"
                    android:paddingHorizontal="10dp">
                    <CheckBox
                        android:id="@+id/use_my_wallpaper"
@@ -73,4 +81,29 @@
                </RelativeLayout>
            </LinearLayout>
        </LinearLayout>

        <androidx.core.widget.ContentLoadingProgressBar
            android:id="@+id/loading_indicator"
            style="@android:style/Widget.DeviceDefault.ProgressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="200dp"
            android:layout_gravity="center_horizontal|top"
            android:indeterminate="true"/>

        <FrameLayout
            android:id="@+id/error_section"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone">
            <TextView
                android:id="@+id/error_message"
                style="@style/HeaderTextAppearance"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/something_went_wrong"/>
        </FrameLayout>
    </FrameLayout>
</LinearLayout>
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
    android:layout_height="wrap_content"
    android:paddingRight="2dp"
    android:paddingBottom="@dimen/option_bottom_margin"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:orientation="vertical">

    <TextView
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
    android:layout_height="wrap_content"
    android:paddingRight="2dp"
    android:paddingBottom="@dimen/option_bottom_margin"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:orientation="vertical">

    <TextView
Loading