Files
lawnchair/quickstep/res/layout/taskbar_edu.xml
Andy Wickham a0cc0903e8 Adds additional pages to Taskbar Edu.
Currently there are pages for the following:
 - Splitscreen
 - Customize (add apps/predicted apps)
 - Docking (long press to hide)

At the moment they all use the same placeholder
image from before.

Button states:
 Page 1: Close and Next
 Page 2: Back and Next
 Page 3: Back and Done

You can also swipe left and right between the pages.

Demo: https://drive.google.com/file/d/1_D3i-jZxCRRVHV92p6hG5cm3VGcJ_bhK/view?usp=sharing&resourcekey=0-KHLHTTx67JlmVv-UZoAUAw

Bug: 180605356
Test: Manual
Change-Id: Ibbb81610a611f6ca412e53ed90dc1c67764f417e
2021-08-23 15:12:39 -10:00

158 lines
6.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.taskbar.TaskbarEduView 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"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:gravity="bottom"
android:orientation="vertical"
android:layout_marginHorizontal="108dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/edu_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_rounded_corner_bottom_sheet"
android:gravity="center_horizontal"
android:paddingHorizontal="36dp"
android:paddingTop="64dp">
<com.android.launcher3.taskbar.TaskbarEduPagedView
android:id="@+id/content"
android:clipToPadding="false"
android:layout_width="match_parent"
android:layout_height="378dp"
app:layout_constraintTop_toTopOf="parent"
launcher:pageIndicator="@+id/content_page_indicator">
<LinearLayout
android:id="@+id/page_splitscreen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:gravity="center_horizontal"
style="@style/TextHeadline"
android:text="@string/taskbar_edu_splitscreen"
android:fontFamily="google-sans"
android:textColor="?android:attr/textColorPrimary"
android:textSize="24sp"
android:maxLines="2"/>
<ImageView
android:layout_width="322dp"
android:layout_height="282dp"
android:layout_marginTop="16dp"
android:src="@drawable/taskbar_edu_splitscreen"/>
</LinearLayout>
<LinearLayout
android:id="@+id/page_customize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:gravity="center_horizontal"
style="@style/TextHeadline"
android:text="@string/taskbar_edu_customize"
android:fontFamily="google-sans"
android:textColor="?android:attr/textColorPrimary"
android:textSize="24sp"
android:maxLines="2"/>
<ImageView
android:layout_width="322dp"
android:layout_height="282dp"
android:layout_marginTop="16dp"
android:src="@drawable/taskbar_edu_splitscreen"/>
</LinearLayout>
<LinearLayout
android:id="@+id/page_dock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:gravity="center_horizontal"
style="@style/TextHeadline"
android:text="@string/taskbar_edu_dock"
android:fontFamily="google-sans"
android:textColor="?android:attr/textColorPrimary"
android:textSize="24sp"
android:maxLines="2"/>
<ImageView
android:layout_width="322dp"
android:layout_height="282dp"
android:layout_marginTop="16dp"
android:src="@drawable/taskbar_edu_splitscreen"/>
</LinearLayout>
</com.android.launcher3.taskbar.TaskbarEduPagedView>
<Button
android:id="@+id/edu_start_button"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginBottom="92dp"
app:layout_constraintTop_toBottomOf="@id/content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:text="@string/taskbar_edu_close"
style="@style/TaskbarEdu.Button.Close"
android:textColor="?android:attr/textColorPrimary"/>
<com.android.launcher3.pageindicators.PageIndicatorDots
android:id="@+id/content_page_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/edu_start_button"
app:layout_constraintBottom_toBottomOf="@id/edu_start_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:elevation="1dp" />
<Button
android:id="@+id/edu_end_button"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginBottom="92dp"
app:layout_constraintTop_toBottomOf="@id/content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:text="@string/taskbar_edu_next"
style="@style/TaskbarEdu.Button.Next"
android:textColor="?androidprv:attr/textColorOnAccent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.android.launcher3.taskbar.TaskbarEduView>