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

Commit 9d09dad8 authored by Yadrishnikov Yaroslav's avatar Yadrishnikov Yaroslav Committed by Clark Scheff
Browse files

Allow theming numpad

Ticket: KOV-14

Change-Id: I8932f5f163b3dbe53d89116ccb877fdff093c2d4
parent ef62c1a9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -42,4 +42,7 @@
    <color name="hour_22">#2c273e</color>
    <color name="hour_23">#272430</color>

    <!--- Color to modify the numpad color in timer -->
    <color name="numpad_color">#ffffff</color>

</resources>
+3 −1
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ public class TimerSetupView extends LinearLayout implements Button.OnClickListen
    protected final Button mNumbers [] = new Button [10];
    protected int mInput [] = new int [mInputSize];
    protected int mInputPointer = -1;
    protected int mNumpadColor;
    protected Button mLeft, mRight;
    protected ImageButton mStart;
    protected ImageButton mDelete;
@@ -95,6 +96,7 @@ public class TimerSetupView extends LinearLayout implements Button.OnClickListen
        mDelete.setOnClickListener(this);
        mDelete.setOnLongClickListener(this);
        mDivider = findViewById(R.id.divider);
        mNumpadColor = getResources().getColor(R.color.numpad_color);

        mNumbers[1] = (Button)v1.findViewById(R.id.key_left);
        mNumbers[2] = (Button)v1.findViewById(R.id.key_middle);
@@ -118,7 +120,7 @@ public class TimerSetupView extends LinearLayout implements Button.OnClickListen
        for (int i = 0; i < 10; i++) {
            mNumbers[i].setOnClickListener(this);
            mNumbers[i].setText(String.format("%d", i));
            mNumbers[i].setTextColor(Color.WHITE);
            mNumbers[i].setTextColor(mNumpadColor);
            mNumbers[i].setTag(R.id.numbers_key, new Integer(i));
        }
        updateTime();