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

Commit aed008de authored by Samuel Fufa's avatar Samuel Fufa
Browse files

Hybrid hotseat user edu

Starts by showing a notification, which will open a dialog
with options for users to keep their hotseat layout or fully
migrate to hybrid hotseat

Bug:142753423
Test:Manual
Change-Id: I178de612837ec8551f6776fa7c6fb6111bc7431d
parent f43a5d32
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<vector android:height="24dp" android:viewportHeight="24"
    android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillColor="@color/hotseat_edu_background" android:pathData="M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"/>
</vector>
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<vector android:height="15.53398dp" android:viewportHeight="32"
    android:viewportWidth="412" android:width="200dp" xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillColor="@color/hotseat_edu_background" android:pathData="M412,32v-2.64C349.26,10.51 279.5,0 206,0S62.74,10.51 0,29.36V32H412z"/>
</vector>
+102 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<com.android.launcher3.hybridhotseat.HotseatEduDialog xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_gravity="bottom"
    android:layout_height="wrap_content"
    android:gravity="bottom"
    android:orientation="vertical">

    <View
        android:layout_width="match_parent"
        android:layout_height="32dp"
        android:background="@drawable/hotseat_prediction_edu_top" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/hotseat_edu_background"
        android:orientation="vertical">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="18dp"
            android:fontFamily="google-sans"
            android:paddingLeft="@dimen/hotseat_edu_padding"
            android:paddingRight="@dimen/hotseat_edu_padding"
            android:text="@string/hotseat_migrate_title"
            android:textAlignment="center"
            android:textColor="@android:color/white"
            android:textSize="20sp" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="18dp"
            android:layout_marginBottom="18dp"
            android:fontFamily="roboto-medium"
            android:paddingLeft="@dimen/hotseat_edu_padding"
            android:paddingRight="@dimen/hotseat_edu_padding"
            android:text="@string/hotseat_migrate_message"
            android:textAlignment="center"
            android:textColor="@android:color/white"
            android:textSize="16sp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/hotseat_wrapper"
            android:orientation="vertical">

            <com.android.launcher3.CellLayout
                android:id="@+id/sample_prediction"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                launcher:containerType="hotseat" />

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingLeft="@dimen/hotseat_edu_padding"
                android:paddingTop="8dp"
                android:paddingRight="@dimen/hotseat_edu_padding">

                <Button
                    android:id="@+id/turn_predictions_on"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="end"
                    android:background="?android:attr/selectableItemBackground"
                    android:text="@string/hotseat_migrate_accept"
                    android:textAlignment="textEnd"
                    android:textColor="@android:color/white" />

                <Button
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:id="@+id/no_thanks"
                    android:text="@string/hotseat_migrate_dismiss"
                    android:layout_gravity="start"
                    android:background="?android:attr/selectableItemBackground"
                    android:textColor="@android:color/white" />

            </FrameLayout>
        </LinearLayout>
    </LinearLayout>

</com.android.launcher3.hybridhotseat.HotseatEduDialog>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -6,4 +6,6 @@
    <color name="all_apps_label_text_dark">#61FFFFFF</color>
    <color name="all_apps_prediction_row_separator">#3c000000</color>
    <color name="all_apps_prediction_row_separator_dark">#3cffffff</color>

    <color name="hotseat_edu_background">#f01A73E8</color>
</resources>
 No newline at end of file
+2 −3
Original line number Diff line number Diff line
@@ -29,8 +29,7 @@
    <dimen name="swipe_up_y_overshoot">10dp</dimen>
    <dimen name="swipe_up_max_workspace_trans_y">-60dp</dimen>

    <!-- Predicted icon related -->
    <dimen name="predicted_icon_background_corner_radius">15dp</dimen>
    <dimen name="predicted_icon_background_inset">8dp</dimen>
    <!-- Hybrid hotseat related -->
    <dimen name="hotseat_edu_padding">24dp</dimen>

</resources>
 No newline at end of file
Loading