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

Commit 9314b7c0 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Separating double shadow logic for BubbleTextView in a separate subclass

This allows better customization and reuse of the double shadow logic and simplified
various attribute management

Change-Id: I5e277d8399756385452d8bb8c0a0107234a76d34
parent a9d721df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,4 +14,4 @@
     limitations under the License.
-->

<com.android.launcher3.BubbleTextView style="@style/BaseIcon.Workspace" />
<com.android.launcher3.views.DoubleShadowBubbleTextView style="@style/BaseIcon.Workspace" />
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:focusable="true" >
    <com.android.launcher3.BubbleTextView
    <com.android.launcher3.views.DoubleShadowBubbleTextView
        style="@style/BaseIcon.Workspace"
        android:id="@+id/folder_icon_name"
        android:focusable="false"
+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@
        android:textColor="?android:attr/textColorPrimary"
        android:textSize="16sp"
        android:textAlignment="viewStart"
        launcher:customShadows="false"
        launcher:deferShadowGeneration="true"
        launcher:iconDisplay="widget_section"
        launcher:iconSizeOverride="@dimen/widget_section_icon_size"
+6 −1
Original line number Diff line number Diff line
@@ -43,10 +43,15 @@
            <enum name="shortcut_popup" value="4" />
        </attr>
        <attr name="deferShadowGeneration" format="boolean" />
        <attr name="customShadows" format="boolean" />
        <attr name="centerVertically" format="boolean" />
    </declare-styleable>

    <declare-styleable name="ShadowInfo">
        <attr name="ambientShadowColor" format="color" />
        <attr name="ambientShadowBlur" format="dimension" />
        <attr name="keyShadowColor" format="color" />
        <attr name="keyShadowBlur" format="dimension" />
        <attr name="keyShadowOffset" format="dimension" />
    </declare-styleable>

    <!-- PagedView specific attributes. These attributes are used to customize
+4 −3
Original line number Diff line number Diff line
@@ -119,16 +119,17 @@

        <!-- No shadows in the base theme -->
        <item name="android:shadowRadius">0</item>
        <item name="customShadows">false</item>
    </style>

    <!-- Icon displayed on the worksapce -->
    <style name="BaseIcon.Workspace">
        <item name="customShadows">true</item>
        <item name="android:shadowRadius">2.0</item>
        <item name="android:shadowColor">?attr/workspaceShadowColor</item>
        <item name="keyShadowColor">?attr/workspaceKeyShadowColor</item>
        <item name="ambientShadowColor">?attr/workspaceAmbientShadowColor</item>
        <item name="ambientShadowBlur">2.5dp</item>
        <item name="keyShadowColor">?attr/workspaceKeyShadowColor</item>
        <item name="keyShadowBlur">1dp</item>
        <item name="keyShadowOffset">.5dp</item>
    </style>

    <!-- Theme for the popup container -->
Loading