set background color filters for icons in suggestion strip, hopefully fixes #141

This commit is contained in:
Helium314 2023-09-13 14:12:24 +02:00
parent 726e923f79
commit f321de326a

View file

@ -148,7 +148,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
word.setContentDescription(getResources().getString(R.string.spoken_empty_suggestion));
word.setOnClickListener(this);
word.setOnLongClickListener(this);
colors.setBackgroundColor(word.getBackground(), BackgroundType.SUGGESTION);
colors.setBackgroundColor(word.getBackground(), BackgroundType.SUGGESTION); // only necessary in some Android versions
mWordViews.add(word);
final View divider = inflater.inflate(R.layout.suggestion_divider, null);
mDividerViews.add(divider);
@ -190,6 +190,11 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
mClipboardKey.setColorFilter(colors.getKeyText());
mVoiceKey.setColorFilter(colors.getKeyText());
mOtherKey.setColorFilter(colors.getKeyText());
// only necessary in some Android versions
colors.setBackgroundColor(mClipboardKey.getBackground(), BackgroundType.SUGGESTION);
colors.setBackgroundColor(mVoiceKey.getBackground(), BackgroundType.SUGGESTION);
colors.setBackgroundColor(mOtherKey.getBackground(), BackgroundType.SUGGESTION);
}
/**