From b07f4bb4895298290f967c04f78c8534801fc755 Mon Sep 17 00:00:00 2001 From: Helium314 Date: Fri, 20 Oct 2023 18:15:04 +0200 Subject: [PATCH] use new drawable when setting background after removing pinned toolbar key fixes #184 --- .../inputmethod/latin/suggestions/SuggestionStripView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/dslul/openboard/inputmethod/latin/suggestions/SuggestionStripView.java b/app/src/main/java/org/dslul/openboard/inputmethod/latin/suggestions/SuggestionStripView.java index 1a52d2067..96169331b 100644 --- a/app/src/main/java/org/dslul/openboard/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/app/src/main/java/org/dslul/openboard/inputmethod/latin/suggestions/SuggestionStripView.java @@ -343,7 +343,7 @@ private void onLongClickToolKey(final View view) { Settings.addPinnedKey(DeviceProtectedUtils.getSharedPreferences(getContext()), tag); } else { Settings.removePinnedKey(DeviceProtectedUtils.getSharedPreferences(getContext()), tag); - mToolbar.findViewWithTag(tag).setBackground(mDefaultBackground); + mToolbar.findViewWithTag(tag).setBackground(mDefaultBackground.getConstantState().newDrawable(getResources())); mPinnedKeys.removeView(pinnedKeyView); } }