diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/setup/SetupWizardActivity.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/setup/SetupWizardActivity.java index 96dbf5af2..0f88a3cd5 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/setup/SetupWizardActivity.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/setup/SetupWizardActivity.java @@ -9,7 +9,10 @@ package org.dslul.openboard.inputmethod.latin.setup; import android.app.Activity; import android.content.ContentResolver; import android.content.Intent; +import android.content.res.ColorStateList; import android.content.res.Resources; +import android.graphics.Color; +import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Message; @@ -22,6 +25,8 @@ import android.widget.TextView; import android.widget.VideoView; import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; import org.dslul.openboard.inputmethod.latin.R; import org.dslul.openboard.inputmethod.latin.settings.SettingsActivity; @@ -141,7 +146,7 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL final SetupStep step1 = new SetupStep(STEP_1, applicationName, mStep1Bullet, findViewById(R.id.setup_step1), R.string.setup_step1_title, R.string.setup_step1_instruction, - R.string.setup_step1_finished_instruction, R.drawable.ic_setup_step1, + R.string.setup_step1_finished_instruction, R.drawable.ic_setup_key, R.string.setup_step1_action); final SettingsPoolingHandler handler = mHandler; step1.setAction(() -> { @@ -153,7 +158,7 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL final SetupStep step2 = new SetupStep(STEP_2, applicationName, (TextView)findViewById(R.id.setup_step2_bullet), findViewById(R.id.setup_step2), R.string.setup_step2_title, R.string.setup_step2_instruction, - 0 /* finishedInstruction */, R.drawable.ic_setup_step2, + 0 /* finishedInstruction */, R.drawable.ic_setup_select, R.string.setup_step2_action); step2.setAction(this::invokeInputMethodPicker); mSetupStepGroup.addStep(step2); @@ -161,7 +166,7 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL final SetupStep step3 = new SetupStep(STEP_3, applicationName, (TextView)findViewById(R.id.setup_step3_bullet), findViewById(R.id.setup_step3), R.string.setup_step3_title, R.string.setup_step3_instruction, - 0 /* finishedInstruction */, R.drawable.ic_setup_step3, + 0 /* finishedInstruction */, R.drawable.ic_setup_earth, R.string.setup_step3_action); step3.setAction(() -> { final Intent intent = new Intent(getApplicationContext(), SettingsActivity.class); @@ -196,8 +201,10 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL mActionNext = findViewById(R.id.setup_next); mActionNext.setOnClickListener(this); mActionFinish = findViewById(R.id.setup_finish); - mActionFinish.setCompoundDrawablesRelativeWithIntrinsicBounds(getResources().getDrawable(R.drawable.ic_setup_finish), - null, null, null); + final Drawable finishDrawable = ContextCompat.getDrawable(this, R.drawable.ic_setup_check); + DrawableCompat.setTintList(finishDrawable, new ColorStateList(new int[][]{{android.R.attr.state_focused}, {android.R.attr.state_pressed}, {}}, + new int[]{Color.WHITE, Color.WHITE, step1.mActivatedColor})); + mActionFinish.setCompoundDrawablesRelativeWithIntrinsicBounds(finishDrawable, null, null, null); mActionFinish.setOnClickListener(this); } @@ -420,12 +427,15 @@ public final class SetupWizardActivity extends Activity implements View.OnClickL mActionLabel = mStepView.findViewById(R.id.setup_step_action_label); mActionLabel.setText(res.getString(actionLabel)); + final Drawable actionIconDrawable = res.getDrawable(actionIcon); + DrawableCompat.setTintList(actionIconDrawable, new ColorStateList(new int[][]{{android.R.attr.state_focused}, {android.R.attr.state_pressed}, {}}, + new int[]{Color.WHITE, Color.WHITE, this.mActivatedColor})); if (actionIcon == 0) { final int paddingEnd = mActionLabel.getPaddingEnd(); mActionLabel.setPaddingRelative(paddingEnd, 0, paddingEnd, 0); } else { mActionLabel.setCompoundDrawablesRelativeWithIntrinsicBounds( - res.getDrawable(actionIcon), null, null, null); + actionIconDrawable, null, null, null); } } diff --git a/app/src/main/res/drawable-hdpi/unbundled_check_01.webp b/app/src/main/res/drawable-hdpi/unbundled_check_01.webp deleted file mode 100644 index 5af9bedda..000000000 Binary files a/app/src/main/res/drawable-hdpi/unbundled_check_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/unbundled_earth_01.webp b/app/src/main/res/drawable-hdpi/unbundled_earth_01.webp deleted file mode 100644 index ab1a46353..000000000 Binary files a/app/src/main/res/drawable-hdpi/unbundled_earth_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/unbundled_key_01.webp b/app/src/main/res/drawable-hdpi/unbundled_key_01.webp deleted file mode 100644 index b7b29ad9e..000000000 Binary files a/app/src/main/res/drawable-hdpi/unbundled_key_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/unbundled_select_01.webp b/app/src/main/res/drawable-hdpi/unbundled_select_01.webp deleted file mode 100644 index 6015940bd..000000000 Binary files a/app/src/main/res/drawable-hdpi/unbundled_select_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/unbundled_check_01.webp b/app/src/main/res/drawable-mdpi/unbundled_check_01.webp deleted file mode 100644 index 7d2d26bd3..000000000 Binary files a/app/src/main/res/drawable-mdpi/unbundled_check_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/unbundled_earth_01.webp b/app/src/main/res/drawable-mdpi/unbundled_earth_01.webp deleted file mode 100644 index 225f63276..000000000 Binary files a/app/src/main/res/drawable-mdpi/unbundled_earth_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/unbundled_key_01.webp b/app/src/main/res/drawable-mdpi/unbundled_key_01.webp deleted file mode 100644 index b61e6a8c6..000000000 Binary files a/app/src/main/res/drawable-mdpi/unbundled_key_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/unbundled_select_01.webp b/app/src/main/res/drawable-mdpi/unbundled_select_01.webp deleted file mode 100644 index b3ecc5090..000000000 Binary files a/app/src/main/res/drawable-mdpi/unbundled_select_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/unbundled_check_01.webp b/app/src/main/res/drawable-xhdpi/unbundled_check_01.webp deleted file mode 100644 index 4d28469d8..000000000 Binary files a/app/src/main/res/drawable-xhdpi/unbundled_check_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/unbundled_earth_01.webp b/app/src/main/res/drawable-xhdpi/unbundled_earth_01.webp deleted file mode 100644 index e687dbf83..000000000 Binary files a/app/src/main/res/drawable-xhdpi/unbundled_earth_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/unbundled_key_01.webp b/app/src/main/res/drawable-xhdpi/unbundled_key_01.webp deleted file mode 100644 index 77a76c0b0..000000000 Binary files a/app/src/main/res/drawable-xhdpi/unbundled_key_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/unbundled_select_01.webp b/app/src/main/res/drawable-xhdpi/unbundled_select_01.webp deleted file mode 100644 index ecaac69af..000000000 Binary files a/app/src/main/res/drawable-xhdpi/unbundled_select_01.webp and /dev/null differ diff --git a/app/src/main/res/drawable/ic_setup_check.xml b/app/src/main/res/drawable/ic_setup_check.xml new file mode 100644 index 000000000..02fadcbf9 --- /dev/null +++ b/app/src/main/res/drawable/ic_setup_check.xml @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_setup_earth.xml b/app/src/main/res/drawable/ic_setup_earth.xml new file mode 100644 index 000000000..308987ae6 --- /dev/null +++ b/app/src/main/res/drawable/ic_setup_earth.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_setup_finish.xml b/app/src/main/res/drawable/ic_setup_finish.xml deleted file mode 100644 index 1999946a8..000000000 --- a/app/src/main/res/drawable/ic_setup_finish.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_setup_key.xml b/app/src/main/res/drawable/ic_setup_key.xml new file mode 100644 index 000000000..2cbbdc25d --- /dev/null +++ b/app/src/main/res/drawable/ic_setup_key.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_setup_select.xml b/app/src/main/res/drawable/ic_setup_select.xml new file mode 100644 index 000000000..87c807479 --- /dev/null +++ b/app/src/main/res/drawable/ic_setup_select.xml @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_setup_step1.xml b/app/src/main/res/drawable/ic_setup_step1.xml deleted file mode 100644 index 3d68d7a2c..000000000 --- a/app/src/main/res/drawable/ic_setup_step1.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_setup_step2.xml b/app/src/main/res/drawable/ic_setup_step2.xml deleted file mode 100644 index bd97c84f9..000000000 --- a/app/src/main/res/drawable/ic_setup_step2.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_setup_step3.xml b/app/src/main/res/drawable/ic_setup_step3.xml deleted file mode 100644 index d1bb6c5a6..000000000 --- a/app/src/main/res/drawable/ic_setup_step3.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - -