mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 08:07:42 +00:00
different way of implementing larger toolbar key
see GH-1556, fixes GH-1621
This commit is contained in:
parent
82bea7facf
commit
0e86978df3
3 changed files with 17 additions and 8 deletions
|
@ -14,12 +14,9 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
import android.graphics.drawable.ShapeDrawable;
|
||||
import android.graphics.drawable.shapes.OvalShape;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
|
@ -214,8 +211,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
mToolbarExpandKey.setOnClickListener(this);
|
||||
mToolbarExpandKey.setImageDrawable(Settings.getValues().mIncognitoModeEnabled ? mIncognitoIcon : mToolbarArrowIcon);
|
||||
colors.setColor(mToolbarExpandKey, ColorType.TOOL_BAR_EXPAND_KEY);
|
||||
mToolbarExpandKey.setBackground(new ShapeDrawable(new OvalShape())); // ShapeDrawable color is black, need src_atop filter
|
||||
mToolbarExpandKey.getBackground().setColorFilter(colors.get(ColorType.TOOL_BAR_EXPAND_KEY_BACKGROUND), PorterDuff.Mode.SRC_ATOP);
|
||||
colors.setColor(mToolbarExpandKey.getBackground(), ColorType.TOOL_BAR_EXPAND_KEY_BACKGROUND);
|
||||
|
||||
for (final ToolbarKey pinnedKey : ToolbarUtilsKt.getPinnedToolbarKeys(prefs)) {
|
||||
final ImageButton button = createToolbarKey(context, iconsSet, pinnedKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue