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

Commit 13c3f31a authored by Andy Wickham's avatar Andy Wickham
Browse files

Makes All Set layout more responsive.

 - No longer forced portrait mode
 - Bottom texts are aligned proportionally to the screen height
   to avoid overlapping in landscape folded
 - Subtitle text width is limited to force wrapping to avoid an
   awkward line of text on wider screens

Fix: 189896987
Bug: 187701213
Test: Manually went between portrait/landscape/folded/unfolded.
Change-Id: Ibb2bbe545cf7f154ad77e10d574e72f8d9110a72
parent 2d9741b8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -116,7 +116,6 @@
        <activity android:name="com.android.quickstep.interaction.AllSetActivity"
            android:autoRemoveFromRecents="true"
            android:excludeFromRecents="true"
            android:screenOrientation="portrait"
            android:permission="android.permission.REBOOT"
            android:theme="@style/AllSetTheme"
            android:label="@string/allset_title"
+51 −38
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingStart="@dimen/allset_page_margin_horizontal"
@@ -22,19 +23,13 @@
    android:layoutDirection="locale"
    android:textDirection="locale">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_gravity="start"
        android:gravity="start"
        android:orientation="vertical">

    <ImageView
        android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/allset_title_icon_margin_top"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        android:src="@drawable/ic_all_set"/>

    <TextView
@@ -43,39 +38,57 @@
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/allset_title_margin_top"
        app:layout_constraintTop_toBottomOf="@id/icon"
        app:layout_constraintStart_toStartOf="parent"
        android:gravity="start"
        android:text="@string/allset_title"/>

    <TextView
        android:id="@+id/subtitle"
        style="@style/TextAppearance.GestureTutorial.Feedback.Subtitle"
            android:layout_width="match_parent"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/allset_subtitle_margin_top"
        app:layout_constraintTop_toBottomOf="@id/title"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintWidth_max="@dimen/allset_subtitle_width_max"
        android:gravity="start"
        android:text="@string/allset_description"/>
    </LinearLayout>

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/navigation_settings_guideline_bottom"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.83" />

    <TextView
        android:id="@+id/navigation_settings"
        style="@style/TextAppearance.GestureTutorial.LinkText"
        android:layout_width="match_parent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/hint"
        android:gravity="center"
        android:layout_marginBottom="72dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/navigation_settings_guideline_bottom"
        android:minHeight="48dp"
        android:background="?android:attr/selectableItemBackground"
        android:text="@string/allset_navigation_settings" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/hint_guideline_bottom"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.94" />

    <TextView
        android:id="@id/hint"
        android:id="@+id/hint"
        style="@style/TextAppearance.GestureTutorial.Feedback.Subtitle"
        android:textSize="14sp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/allset_hint_margin_bottom"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/hint_guideline_bottom"
        android:text="@string/allset_hint"/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+1 −1
Original line number Diff line number Diff line
@@ -125,8 +125,8 @@
    <dimen name="allset_page_margin_horizontal">40dp</dimen>
    <dimen name="allset_title_margin_top">24dp</dimen>
    <dimen name="allset_title_icon_margin_top">32dp</dimen>
    <dimen name="allset_hint_margin_bottom">52dp</dimen>
    <dimen name="allset_subtitle_margin_top">24dp</dimen>
    <dimen name="allset_subtitle_width_max">348dp</dimen>

    <!-- All Apps Education tutorial -->
    <dimen name="swipe_edu_padding">8dp</dimen>