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

Commit 6ca235de authored by Jason Monk's avatar Jason Monk
Browse files

Add primaryContentAlpha attribute

And create a generic primary text selector that can be used for all
themes.

Test: Manual
Change-Id: I274da909209188d7a8f4924ee8c64eff7011b7e2
parent fcca000d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -989,6 +989,7 @@ package android {
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int primaryContentAlpha = 16843367; // 0x1010267
    field public static final int priority = 16842780; // 0x101001c
    field public static final int priority = 16842780; // 0x101001c
    field public static final int privateImeOptions = 16843299; // 0x1010223
    field public static final int privateImeOptions = 16843299; // 0x1010223
    field public static final int process = 16842769; // 0x1010011
    field public static final int process = 16842769; // 0x1010011
+1 −0
Original line number Original line Diff line number Diff line
@@ -1098,6 +1098,7 @@ package android {
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int primaryContentAlpha = 16843367; // 0x1010267
    field public static final int priority = 16842780; // 0x101001c
    field public static final int priority = 16842780; // 0x101001c
    field public static final int privateImeOptions = 16843299; // 0x1010223
    field public static final int privateImeOptions = 16843299; // 0x1010223
    field public static final int process = 16842769; // 0x1010011
    field public static final int process = 16842769; // 0x1010011
+1 −0
Original line number Original line Diff line number Diff line
@@ -989,6 +989,7 @@ package android {
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int primaryContentAlpha = 16843367; // 0x1010267
    field public static final int priority = 16842780; // 0x101001c
    field public static final int priority = 16842780; // 0x101001c
    field public static final int privateImeOptions = 16843299; // 0x1010223
    field public static final int privateImeOptions = 16843299; // 0x1010223
    field public static final int process = 16842769; // 0x1010011
    field public static final int process = 16842769; // 0x1010011
+23 −0
Original line number Original line 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.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false"
        android:alpha="?attr/disabledAlpha"
        android:color="?attr/colorForeground"/>
    <item android:alpha="?attr/primaryContentAlpha"
        android:color="?attr/colorForeground"/>
</selector>
+2 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,8 @@


        <!-- Default disabled alpha for widgets that set enabled/disabled alpha programmatically. -->
        <!-- Default disabled alpha for widgets that set enabled/disabled alpha programmatically. -->
        <attr name="disabledAlpha" format="float" />
        <attr name="disabledAlpha" format="float" />
        <!-- The alpha applied to the foreground color to create the primary text color. -->
        <attr name="primaryContentAlpha" format="float" />
        <!-- Default background dim amount when a menu, dialog, or something similar pops up. -->
        <!-- Default background dim amount when a menu, dialog, or something similar pops up. -->
        <attr name="backgroundDimAmount" format="float" />
        <attr name="backgroundDimAmount" format="float" />
        <!-- Control whether dimming behind the window is enabled.  The default
        <!-- Control whether dimming behind the window is enabled.  The default
Loading