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

Commit 307ad092 authored by Alan Viverette's avatar Alan Viverette
Browse files

Add alpha to bitmap, nine patch drawable, fix container hot spots

Also fixes primary text disabled state alpha.

BUG: 13818888
Change-Id: I9ae2e25216014177c2dac24f5c9095df87724a43
parent 2bcd4023
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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_enabled="false" android:alpha="0.5" android:color="@color/primary_text_default_quantum_dark"/>
    <item android:color="@color/primary_text_default_quantum_dark"/>
</selector>
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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_enabled="false" android:alpha="0.5" android:color="@color/primary_text_default_quantum_light"/>
    <item android:color="@color/primary_text_default_quantum_light"/>
</selector>
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
    <selector>
        <item android:state_enabled="false">
            <nine-patch android:src="@drawable/btn_qntm_alpha"
                android:tint="?attr/colorButtonNormal" />
                android:tint="?attr/colorButtonNormal"
                android:alpha="?attr/disabledAlpha" />
        </item>
        <item>
            <nine-patch android:src="@drawable/btn_qntm_alpha"
+13 −2
Original line number Diff line number Diff line
@@ -17,7 +17,18 @@
<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android"
    android:tint="?attr/colorButtonPressed">
    <item>
        <nine-patch android:src="@drawable/btn_qntm_alpha"
        <selector>
            <item android:state_enabled="false">
                <nine-patch
                    android:src="@drawable/btn_qntm_alpha"
                    android:tint="?attr/colorButtonNormal"
                    android:alpha="?attr/disabledAlpha" />
            </item>
            <item>
                <nine-patch
                    android:src="@drawable/btn_qntm_alpha"
                    android:tint="?attr/colorButtonNormal" />
            </item>
        </selector>
    </item>
</touch-feedback>
+4 −0
Original line number Diff line number Diff line
@@ -4504,6 +4504,8 @@
                 result to valid color values. Saturate(S + D) -->
            <enum name="add" value="16" />
        </attr>
        <!-- Specifies the alpha multiplier to apply to the base drawable. -->
        <attr name="alpha" />
    </declare-styleable>

    <!-- Drawable used to draw 9-patches. -->
@@ -4523,6 +4525,8 @@
        <!-- When a tint color is set, specifies its Porter-Duff blending mode. The
             default value is src_in, which treats the drawable as an alpha mask. -->
        <attr name="tintMode" />
        <!-- Specifies the alpha multiplier to apply to the base drawable. -->
        <attr name="alpha" />
    </declare-styleable>

    <!-- Drawable used to draw a single color. -->
Loading