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

Commit 9633da3c authored by Nihanth Subramanya's avatar Nihanth Subramanya
Browse files

LatinIME: Make some stuff themable

Delete, shift, tab, settings icons were not getting
redirected because the drawable was never requested and
theme chooser seems not to redirect initial icons.
(Not sure but this may be why the lockscreen isn't themable)

Also, I added functionality for keys with dark backgrounds to have
a different text color.

Finally, keyTextStyle is now an integer format so that
the integer variables can be redirected easily.

Change-Id: I5d391b30d0e01f8b3c367b792d2819c27d78a017
parent 3a40d0d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -30,5 +30,5 @@
        android:textStyle="bold"
        android:textStyle="bold"


        latin:keyBackground="@drawable/btn_keyboard_key_gingerbread"
        latin:keyBackground="@drawable/btn_keyboard_key_gingerbread"
        latin:keyTextStyle="bold"
        latin:keyTextStyle="@integer/text_style_bold"
        />
        />
+1 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,7 @@
        latin:keyBackground="@drawable/btn_keyboard_key_stone"
        latin:keyBackground="@drawable/btn_keyboard_key_stone"
        latin:keyTextColor="@color/latinkeyboard_key_color_black"
        latin:keyTextColor="@color/latinkeyboard_key_color_black"
        latin:shadowColor="@color/latinkeyboard_key_color_white"
        latin:shadowColor="@color/latinkeyboard_key_color_white"
        latin:keyTextStyle="bold"
        latin:keyTextStyle="@integer/text_style_bold"
        latin:symbolColorScheme="black"
        latin:symbolColorScheme="black"
        latin:popupLayout="@layout/input_stone_popup"
        latin:popupLayout="@layout/input_stone_popup"
        />
        />
+7 −5
Original line number Original line Diff line number Diff line
@@ -34,6 +34,9 @@
        <!-- Color to use for the label in a key. -->
        <!-- Color to use for the label in a key. -->
        <attr name="keyTextColor" format="color" />
        <attr name="keyTextColor" format="color" />


        <!-- Color to use for the label in a key with a dark background. -->
        <attr name="keyDarkTextColor" format="color" />

        <!-- Layout resource for key press feedback.-->
        <!-- Layout resource for key press feedback.-->
        <attr name="keyPreviewLayout" format="reference" />
        <attr name="keyPreviewLayout" format="reference" />


@@ -53,14 +56,13 @@
        <attr name="popupLayout" format="reference" />
        <attr name="popupLayout" format="reference" />


        <attr name="shadowColor" format="color" />
        <attr name="shadowColor" format="color" />
        <!-- Shadow color for keys with a dark background -->
        <attr name="darkShadowColor" format="color" />

        <attr name="shadowRadius" format="float" />
        <attr name="shadowRadius" format="float" />
        <attr name="backgroundDimAmount" format="float" />
        <attr name="backgroundDimAmount" format="float" />


        <attr name="keyTextStyle">
        <attr name="keyTextStyle" format="integer" min="0" max="2" />
            <flag name="normal" value="0" />
            <flag name="bold" value="1" />
            <flag name="italic" value="2" />
        </attr>


        <attr name="symbolColorScheme">
        <attr name="symbolColorScheme">
            <flag name="white" value="0" />
            <flag name="white" value="0" />
+2 −0
Original line number Original line Diff line number Diff line
@@ -30,5 +30,7 @@
    <color name="latinkeyboard_key_color_white">#FFFFFFFF</color>
    <color name="latinkeyboard_key_color_white">#FFFFFFFF</color>
    <color name="latinkeyboard_key_color_black">#FF000000</color>
    <color name="latinkeyboard_key_color_black">#FF000000</color>
    <color name="latinkeyboard_key_text_color">#FFFFFFFF</color>
    <color name="latinkeyboard_key_text_color">#FFFFFFFF</color>
    <color name="latinkeyboard_key_dark_text_color">#FFFFFFFF</color>
    <color name="latinkeyboard_key_shadow_color">#BB000000</color>
    <color name="latinkeyboard_key_shadow_color">#BB000000</color>
    <color name="latinkeyboard_key_dark_shadow_color">#BB000000</color>
</resources>
</resources>
+24 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* 
**
** Copyright 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.
*/
-->
<resources>
    <integer name="text_style_normal">0</integer>
    <integer name="text_style_bold">1</integer>
    <integer name="text_style_italic">2</integer>
</resources>
Loading