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

Commit fb553ed2 authored by Chris Göllner's avatar Chris Göllner
Browse files

Shortcut Helper - "Scaffold" implementation

Implementation of the helper container and its bottom sheet

Test: Manual
Flag: NONE
Fixes: 335387426
Change-Id: Ie9930437943d24f5552cba7abd764074b458b9d6
parent 3473ec33
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1033,6 +1033,7 @@

        <receiver
            android:name=".statusbar.KeyboardShortcutsReceiver"
            android:visibleToInstantApps="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.intent.action.DISMISS_KEYBOARD_SHORTCUTS" />
@@ -1113,5 +1114,11 @@
                android:name="android.service.dream"
                android:resource="@xml/home_controls_dream_metadata" />
        </service>

        <activity android:name="com.android.systemui.keyboard.shortcut.ShortcutHelperActivity"
            android:exported="false"
            android:theme="@style/ShortcutHelperTheme"
            android:excludeFromRecents="true"
            android:finishOnCloseSystemDialogs="true" />
    </application>
</manifest>
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 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.
  -->

<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/accelerate_interpolator"
    android:zAdjustment="top">

    <translate
        android:fromYDelta="0"
        android:toYDelta="100%"
        android:duration="@android:integer/config_shortAnimTime" />
</set>
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 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.
  -->

<!-- Animation for when a dock window at the bottom of the screen is entering. -->
<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/accelerate_decelerate_interpolator"
    android:zAdjustment="top">

    <translate android:fromYDelta="100%"
        android:toYDelta="0"
        android:startOffset="@android:integer/config_shortAnimTime"
        android:duration="@android:integer/config_mediumAnimTime"/>
</set>
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/shortcut_helper_sheet_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/shortcut_helper_sheet"
        style="@style/Widget.Material3.BottomSheet"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

        <!-- Drag handle for accessibility -->
        <com.google.android.material.bottomsheet.BottomSheetDragHandleView
            android:id="@+id/drag_handle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:textAppearance="?textAppearanceDisplayLarge"
            android:background="?colorTertiaryContainer"
            android:text="Shortcut Helper Content" />
    </LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+4 −0
Original line number Diff line number Diff line
@@ -72,4 +72,8 @@
        <item name="android:textColor">@color/material_dynamic_secondary80</item>
    </style>

    <style name="ShortcutHelperTheme" parent="@style/ShortcutHelperThemeCommon">
        <item name="android:windowLightNavigationBar">false</item>
    </style>

</resources>
Loading