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

Commit 3ce99d1d authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Inset the contents of AllSetActivity" into udc-qpr-dev

parents f63ceeba ae62216f
Loading
Loading
Loading
Loading
+136 −128
Original line number Diff line number Diff line
@@ -13,17 +13,23 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<androidx.constraintlayout.widget.ConstraintLayout
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:theme="@style/GestureTutorialActivity"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?androidprv:attr/materialColorSurfaceContainer"
    android:fitsSystemWindows="true">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingTop="@dimen/gesture_tutorial_menu_padding_top"
        android:paddingBottom="@dimen/gesture_tutorial_menu_padding_bottom"
        android:paddingHorizontal="@dimen/gesture_tutorial_menu_padding_horizontal"
    android:background="?androidprv:attr/materialColorSurfaceContainer">
        android:clipToPadding="false">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/gesture_tutorial_menu_home_button"
@@ -165,3 +171,5 @@
            app:layout_constraintEnd_toEndOf="parent"/>

    </androidx.constraintlayout.widget.ConstraintLayout>

</FrameLayout>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:fitsSystemWindows="true"

        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
@@ -95,7 +96,6 @@
                style="@style/TextAppearance.GestureTutorial.Feedback.Subtitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="24dp"
                android:text="@string/allset_hint"
                android:textSize="@dimen/allset_page_swipe_up_text_size"
                android:gravity="center_horizontal"
+134 −127
Original line number Diff line number Diff line
@@ -13,17 +13,22 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<androidx.constraintlayout.widget.ConstraintLayout
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:theme="@style/GestureTutorialActivity"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?androidprv:attr/materialColorSurfaceContainer"
    android:fitsSystemWindows="true">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingTop="@dimen/gesture_tutorial_menu_padding_top"
        android:paddingBottom="@dimen/gesture_tutorial_menu_padding_bottom"
        android:paddingHorizontal="@dimen/gesture_tutorial_menu_padding_horizontal"
    android:background="?androidprv:attr/materialColorSurfaceContainer"
        android:clipToPadding="false">

        <androidx.constraintlayout.widget.ConstraintLayout
@@ -164,3 +169,5 @@
            app:layout_constraintEnd_toEndOf="parent"/>

    </androidx.constraintlayout.widget.ConstraintLayout>

</FrameLayout>
 No newline at end of file
+1 −18
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ import static com.android.quickstep.interaction.GestureSandboxActivity.KEY_GESTU
import static com.android.quickstep.interaction.GestureSandboxActivity.KEY_TUTORIAL_TYPE;
import static com.android.quickstep.interaction.GestureSandboxActivity.KEY_USE_TUTORIAL_MENU;

import android.graphics.Rect;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -28,33 +27,17 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.R;

/** Displays the gesture nav tutorial menu. */
public final class MenuFragment extends GestureSandboxFragment {

    @NonNull private Rect mInsets = new Rect();

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mInsets = InvariantDeviceProfile.INSTANCE.get(getContext())
                .getDeviceProfile(getContext()).getInsets();
    }

    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
            @Nullable Bundle savedInstanceState) {
        View root = inflater.inflate(
        final View root = inflater.inflate(
                R.layout.gesture_tutorial_step_menu, container, false);

        root.setPadding(
                root.getPaddingLeft() + mInsets.left,
                root.getPaddingTop() + mInsets.top,
                root.getPaddingRight() + mInsets.right,
                root.getPaddingBottom() + mInsets.bottom);

        root.findViewById(R.id.gesture_tutorial_menu_home_button).setOnClickListener(
                v -> launchTutorialStep(TutorialController.TutorialType.HOME_NAVIGATION));
        root.findViewById(R.id.gesture_tutorial_menu_back_button).setOnClickListener(