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

Commit cc4c6147 authored by Zak Cohen's avatar Zak Cohen
Browse files

DeepShortcut - show loading placeholder before content is available.

Sometimes the deep shortcuts can take time to load, show an initial loading
state before any text is set.

Note: changed singleLine to lines=1 as the former causes issues with RTL
layout and is deprecated.

Bug: 78620208
Tested: manual test on pixel 3

Change-Id: I782addb8d64425a1a95cee4f104fc0bd44809815
parent 2c892788
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2017 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.
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="?attr/popupColorSecondary"/>
    <foreground android:drawable="?attr/popupColorSecondary"/>
</adaptive-icon>
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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"
       android:shape="rectangle">
    <solid android:color="?attr/popupColorSecondary" />
    <corners android:radius="8dp" />
    <size android:height="16dp" />
</shape>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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"
       android:shape="oval">
    <solid android:color="?attr/popupColorSecondary" />
    <size
        android:height="32dp"
        android:width="32dp" />
</shape>
+2 −1
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@
        android:layout_width="@dimen/deep_shortcut_icon_size"
        android:layout_height="@dimen/deep_shortcut_icon_size"
        android:layout_marginStart="@dimen/popup_padding_start"
        android:layout_gravity="start|center_vertical" />
        android:layout_gravity="start|center_vertical"
        android:background="@drawable/ic_deepshortcut_placeholder"/>

    <View
        android:id="@+id/divider"
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@
        <item name="android:layout_gravity">center</item>
        <item name="android:focusable">true</item>
        <item name="android:gravity">center_horizontal</item>
        <item name="android:singleLine">true</item>
        <item name="android:lines">1</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:fontFamily">sans-serif-condensed</item>
        <item name="android:defaultFocusHighlightEnabled">false</item>
Loading