mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Launching the gesture nav tutorial in portrait mode on tablets causes fragments with the wrong layout file to be inflated (uses the default phone layout). Reinflating fragments whenever they need to be switched. Added a new rotation prompt fragment Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL Fixes: 291062054 Test: Launched the tutorial in portrait mode and landscape mode, then rotated the screen several times. tried with the flag disabled as well. Change-Id: I0215d7589285007d04ef81d3a63e404c2cda3895
60 lines
2.4 KiB
XML
60 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<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:background="?attr/surfaceHome">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/background"
|
|
android:layout_width="300dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerHorizontal="true"
|
|
android:layout_centerVertical="true"
|
|
android:background="@drawable/rotate_prompt_bg"
|
|
android:padding="24dp"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent">
|
|
|
|
<ImageView
|
|
android:id="@+id/icon"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:src="@drawable/rotate_tutorial_warning"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/rotate_title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="20dp"
|
|
android:lineSpacingExtra="2sp"
|
|
android:text="@string/gesture_tutorial_rotation_prompt_title"
|
|
android:textAppearance="@style/rotate_prompt_title"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/icon"
|
|
app:layout_constraintEnd_toEndOf="parent" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:gravity="center"
|
|
android:text="@string/gesture_tutorial_rotation_prompt"
|
|
android:textAppearance="@style/rotate_prompt_subtitle"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/rotate_title"
|
|
app:layout_constraintEnd_toEndOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |