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

Commit 61aa7990 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I0ab00c03,Ib4e83e36,I72b17568,If4ea3575,If63bf25f, ... into ub-launcher3-qt-dev

* changes:
  Clear all button should not be swipable
  Use custom drawable for Recents Go thumbnails (1/2)
  Add clear all view that scales off device height
  Ensure recents scrolled to first task in landscape
  Enable landscape mode for Recents Go.
  Remove old recyclerview layout logic
  Calculate task height directly off portrait height
  Fix task adapter notify merge conflict
  Move clear all to recycler view (2/2)
  Move clear all to recycler view (1/2)
  Only switch item animator on content fill if needed
  Fix NPE and make getTask return Optional
  Fix ViewTreeObserver crash on Recents Go
  Fix snapshots not updating on app => overview.
  Fix views not being visible on Recents Go.
  Smarter task laying out based off onMeasure
  Change layout size to be dependent on device size
  Update Go recents visibility based off adapter
  Animate content fill animation to Recents Go
  Animate to bottom view in app => overview
  Differentiate empty UI from default in recents Go
  Add task content animation property
  Fix transition progress not applying to drawables
  Change layout anim from Animation => Animator
  Add drawable for default thumbnail for Recents Go
parents 12e8a34e 0eefc853
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -14,13 +14,9 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <dimen name="task_item_half_vert_margin">8dp</dimen>
    <dimen name="task_thumbnail_and_icon_view_size">60dp</dimen>
    <dimen name="task_thumbnail_height">60dp</dimen>
    <dimen name="task_thumbnail_width">36dp</dimen>
    <dimen name="task_icon_size">36dp</dimen>

    <dimen name="clear_all_button_width">106dp</dimen>
    <dimen name="clear_all_button_height">36dp</dimen>
</resources>
 No newline at end of file
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@android:color/darker_gray"/>
    <corners android:radius="2dp"/>
</shape>
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2019 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.quickstep.views.ClearAllItemView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/clear_all_item_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <Button
        android:id="@+id/clear_all_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:background="@drawable/clear_all_button"
        android:gravity="center"
        android:text="@string/recents_clear_all"
        android:textAllCaps="false"
        android:textColor="@color/clear_all_button_text"
        android:textSize="14sp"/>
</com.android.quickstep.views.ClearAllItemView>
+3 −23
Original line number Diff line number Diff line
@@ -19,31 +19,11 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <LinearLayout
        android:id="@+id/recent_task_content_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:visibility="gone">
    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/recent_task_recycler_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
            android:layout_weight="1"
        android:scrollbars="none"/>
        <Button
            android:id="@+id/clear_all_button"
            android:layout_width="@dimen/clear_all_button_width"
            android:layout_height="@dimen/clear_all_button_height"
            android:layout_gravity="center_horizontal"
            android:layout_marginVertical="@dimen/task_item_half_vert_margin"
            android:background="@drawable/clear_all_button"
            android:gravity="center"
            android:text="@string/recents_clear_all"
            android:textAllCaps="false"
            android:textColor="@color/clear_all_button_text"
            android:textSize="14sp"/>
    </LinearLayout>
    <TextView
        android:id="@+id/recent_task_empty_view"
        android:layout_width="match_parent"
+10 −13
Original line number Diff line number Diff line
@@ -17,26 +17,23 @@
<com.android.quickstep.views.TaskItemView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_height="match_parent"
    android:orientation="horizontal">
    <FrameLayout
    <com.android.quickstep.views.TaskThumbnailIconView
        android:id="@+id/task_icon_and_thumbnail"
        android:layout_width="@dimen/task_thumbnail_and_icon_view_size"
        android:layout_height="@dimen/task_thumbnail_and_icon_view_size"
        android:layout_gravity="center_vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginHorizontal="8dp"
        android:layout_marginVertical="@dimen/task_item_half_vert_margin">
        android:layout_marginTop="16dp">
        <ImageView
            android:id="@+id/task_thumbnail"
            android:layout_width="@dimen/task_thumbnail_width"
            android:layout_height="@dimen/task_thumbnail_height"
            android:layout_gravity="top|start"/>
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
        <ImageView
            android:id="@+id/task_icon"
            android:layout_width="@dimen/task_icon_size"
            android:layout_height="@dimen/task_icon_size"
            android:layout_gravity="bottom|end"/>
    </FrameLayout>
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    </com.android.quickstep.views.TaskThumbnailIconView>
    <TextView
        android:id="@+id/task_label"
        android:layout_width="wrap_content"
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.launcher3.uioverrides.states;

import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
@@ -51,6 +52,9 @@ public class OverviewState extends LauncherState {
    public void onStateEnabled(Launcher launcher) {
        IconRecentsView recentsView = launcher.getOverviewPanel();
        recentsView.onBeginTransitionToOverview();
        // Request orientation be set to unspecified, letting the system decide the best
        // orientation.
        launcher.getRotationHelper().setCurrentStateRequest(REQUEST_ROTATE);
    }

    @Override
Loading