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

Commit 99467894 authored by Jiaming Liu's avatar Jiaming Liu
Browse files

[Divider] Draw the divider on the decor surface

This CL draws the divider based on DividerAttributes. Handling drag
events will be in a separate CL.

Bug: 293654166
Test: atest DividerContainerTest
Change-Id: I02eec0b42035058d38db49d52f19b8fd127c1193
parent d44492f0
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -112,10 +112,13 @@ public final class TaskFragmentOperation implements Parcelable {
    /**
     * Creates a decor surface in the parent Task of the TaskFragment. The created decor surface
     * will be provided in {@link TaskFragmentTransaction#TYPE_TASK_FRAGMENT_PARENT_INFO_CHANGED}
     * event callback. The decor surface can be used to draw the divider between TaskFragments or
     * other decorations.
     * event callback. If a decor surface already exists in the parent Task, the current
     * TaskFragment will become the new owner of the decor surface and the decor surface will be
     * moved above the TaskFragment.
     *
     * The decor surface can be used to draw the divider between TaskFragments or other decorations.
     */
    public static final int OP_TYPE_CREATE_TASK_FRAGMENT_DECOR_SURFACE = 14;
    public static final int OP_TYPE_CREATE_OR_MOVE_TASK_FRAGMENT_DECOR_SURFACE = 14;

    /**
     * Removes the decor surface in the parent Task of the TaskFragment.
@@ -162,7 +165,7 @@ public final class TaskFragmentOperation implements Parcelable {
            OP_TYPE_SET_ISOLATED_NAVIGATION,
            OP_TYPE_REORDER_TO_BOTTOM_OF_TASK,
            OP_TYPE_REORDER_TO_TOP_OF_TASK,
            OP_TYPE_CREATE_TASK_FRAGMENT_DECOR_SURFACE,
            OP_TYPE_CREATE_OR_MOVE_TASK_FRAGMENT_DECOR_SURFACE,
            OP_TYPE_REMOVE_TASK_FRAGMENT_DECOR_SURFACE,
            OP_TYPE_SET_DIM_ON_TASK,
            OP_TYPE_SET_MOVE_TO_BOTTOM_IF_CLEAR_WHEN_LAUNCH,
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2024 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.
  -->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true"
        android:drawable="@drawable/activity_embedding_divider_handle_pressed" />
    <item android:drawable="@drawable/activity_embedding_divider_handle_default" />
</selector>
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<!--
  Copyright 2024 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <corners android:radius="@dimen/activity_embedding_divider_handle_radius" />
    <size
        android:width="@dimen/activity_embedding_divider_handle_width"
        android:height="@dimen/activity_embedding_divider_handle_height" />
    <solid android:color="@color/activity_embedding_divider_color" />
</shape>
 No newline at end of file
+23 −0
Original line number Diff line number Diff line
<!--
  Copyright 2024 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <corners android:radius="@dimen/activity_embedding_divider_handle_radius_pressed" />
    <size
        android:width="@dimen/activity_embedding_divider_handle_width_pressed"
        android:height="@dimen/activity_embedding_divider_handle_height_pressed" />
    <solid android:color="@color/activity_embedding_divider_color_pressed" />
</shape>
 No newline at end of file
+4 −0
Original line number Diff line number Diff line
@@ -593,6 +593,10 @@
    <color name="accessibility_magnification_thumbnail_container_background_color">#99000000</color>
    <color name="accessibility_magnification_thumbnail_container_stroke_color">#FFFFFF</color>

    <!-- Activity Embedding divider -->
    <color name="activity_embedding_divider_color">#8e918f</color>
    <color name="activity_embedding_divider_color_pressed">#e3e3e3</color>

    <!-- Lily Language Picker language item view colors -->
    <color name="language_picker_item_text_color">#202124</color>
    <color name="language_picker_item_text_color_secondary">#5F6368</color>
Loading