mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-20 22:29:10 +00:00
add label for bin icon and rename drawable
This commit is contained in:
parent
51a7508374
commit
fe041293b6
6 changed files with 7 additions and 5 deletions
|
@ -119,7 +119,7 @@ class KeyboardIconsSet private constructor() {
|
||||||
NAME_SWITCH_ONEHANDED_KEY to R.drawable.ic_arrow_left,
|
NAME_SWITCH_ONEHANDED_KEY to R.drawable.ic_arrow_left,
|
||||||
NAME_RESIZE_ONEHANDED_KEY to R.drawable.ic_arrow_horizontal,
|
NAME_RESIZE_ONEHANDED_KEY to R.drawable.ic_arrow_horizontal,
|
||||||
NAME_TOOLBAR_KEY to R.drawable.ic_arrow_right,
|
NAME_TOOLBAR_KEY to R.drawable.ic_arrow_right,
|
||||||
NAME_BIN to R.drawable.ic_delete,
|
NAME_BIN to R.drawable.ic_bin,
|
||||||
).apply {
|
).apply {
|
||||||
ToolbarKey.entries.forEach {
|
ToolbarKey.entries.forEach {
|
||||||
put(it.name.lowercase(Locale.US), when (it) {
|
put(it.name.lowercase(Locale.US), when (it) {
|
||||||
|
@ -179,7 +179,7 @@ class KeyboardIconsSet private constructor() {
|
||||||
NAME_SWITCH_ONEHANDED_KEY to R.drawable.ic_arrow_left,
|
NAME_SWITCH_ONEHANDED_KEY to R.drawable.ic_arrow_left,
|
||||||
NAME_RESIZE_ONEHANDED_KEY to R.drawable.ic_arrow_horizontal,
|
NAME_RESIZE_ONEHANDED_KEY to R.drawable.ic_arrow_horizontal,
|
||||||
NAME_TOOLBAR_KEY to R.drawable.ic_arrow_right,
|
NAME_TOOLBAR_KEY to R.drawable.ic_arrow_right,
|
||||||
NAME_BIN to R.drawable.ic_delete,
|
NAME_BIN to R.drawable.ic_bin,
|
||||||
).apply {
|
).apply {
|
||||||
ToolbarKey.entries.forEach {
|
ToolbarKey.entries.forEach {
|
||||||
put(it.name.lowercase(Locale.US), when (it) {
|
put(it.name.lowercase(Locale.US), when (it) {
|
||||||
|
@ -239,7 +239,7 @@ class KeyboardIconsSet private constructor() {
|
||||||
NAME_SWITCH_ONEHANDED_KEY to R.drawable.ic_arrow_left_rounded,
|
NAME_SWITCH_ONEHANDED_KEY to R.drawable.ic_arrow_left_rounded,
|
||||||
NAME_RESIZE_ONEHANDED_KEY to R.drawable.ic_arrow_horizontal_rounded,
|
NAME_RESIZE_ONEHANDED_KEY to R.drawable.ic_arrow_horizontal_rounded,
|
||||||
NAME_TOOLBAR_KEY to R.drawable.ic_arrow_right_rounded,
|
NAME_TOOLBAR_KEY to R.drawable.ic_arrow_right_rounded,
|
||||||
NAME_BIN to R.drawable.ic_delete_rounded,
|
NAME_BIN to R.drawable.ic_bin_rounded,
|
||||||
).apply {
|
).apply {
|
||||||
ToolbarKey.entries.forEach {
|
ToolbarKey.entries.forEach {
|
||||||
put(it.name.lowercase(Locale.US), when (it) {
|
put(it.name.lowercase(Locale.US), when (it) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class UserDictionaryAddWordFragment extends SubScreenFragment {
|
||||||
saveWordButton.setVisibility(TextUtils.isEmpty(mWordEditText.getText().toString()) ? View.INVISIBLE : View.VISIBLE);
|
saveWordButton.setVisibility(TextUtils.isEmpty(mWordEditText.getText().toString()) ? View.INVISIBLE : View.VISIBLE);
|
||||||
|
|
||||||
final Button deleteWordButton = mRootView.findViewById(R.id.user_dictionary_delete_button);
|
final Button deleteWordButton = mRootView.findViewById(R.id.user_dictionary_delete_button);
|
||||||
final Drawable deleteWordIcon = toScaledBitmapDrawable(R.drawable.ic_delete, 0.75f);
|
final Drawable deleteWordIcon = toScaledBitmapDrawable(R.drawable.ic_bin, 0.75f);
|
||||||
deleteWordButton.setCompoundDrawablesWithIntrinsicBounds(null, null, deleteWordIcon, null);
|
deleteWordButton.setCompoundDrawablesWithIntrinsicBounds(null, null, deleteWordIcon, null);
|
||||||
deleteWordButton.setOnClickListener(v -> {
|
deleteWordButton.setOnClickListener(v -> {
|
||||||
mContents.delete(requireContext());
|
mContents.delete(requireContext());
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/delete_button"
|
android:id="@+id/delete_button"
|
||||||
android:paddingEnd="10dp"
|
android:paddingEnd="10dp"
|
||||||
android:src="@drawable/ic_delete"
|
android:src="@drawable/ic_bin"
|
||||||
app:tint="@color/foreground_weak"
|
app:tint="@color/foreground_weak"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
|
|
|
@ -911,6 +911,8 @@ New dictionary:
|
||||||
<string name="label_zwj_key" tools:keep="@string/label_zwj_key">Zero-width joiner</string>
|
<string name="label_zwj_key" tools:keep="@string/label_zwj_key">Zero-width joiner</string>
|
||||||
<!-- Label for zero-width non-joiner key, currently used only for showing the icon name -->
|
<!-- Label for zero-width non-joiner key, currently used only for showing the icon name -->
|
||||||
<string name="label_zwnj_key" tools:keep="@string/label_zwnj_key">Zero-width non-joiner</string>
|
<string name="label_zwnj_key" tools:keep="@string/label_zwnj_key">Zero-width non-joiner</string>
|
||||||
|
<!-- Label for bin (delete) key, currently used only for showing the icon name -->
|
||||||
|
<string name="label_bin" tools:keep="@string/label_bin">Bin</string>
|
||||||
<!-- Title of the setting for horizontal spacebar swipe gesture -->
|
<!-- Title of the setting for horizontal spacebar swipe gesture -->
|
||||||
<string name="show_horizontal_space_swipe">Horizontal spacebar swipe gesture</string>
|
<string name="show_horizontal_space_swipe">Horizontal spacebar swipe gesture</string>
|
||||||
<!-- Title of the setting for vertical spacebar swipe gesture -->
|
<!-- Title of the setting for vertical spacebar swipe gesture -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue