remove unused code / comments in EmojiPalettesView and related resources

This commit is contained in:
Helium314 2025-05-14 16:49:37 +02:00
parent c9059f3616
commit c96eec601d
13 changed files with 0 additions and 45 deletions

View file

@ -59,11 +59,6 @@ import static helium314.keyboard.latin.common.Constants.NOT_A_COORDINATE;
public final class EmojiPalettesView extends LinearLayout
implements View.OnClickListener, OnKeyEventListener {
private boolean initialized = false;
// keep the indicator in case emoji view is changed to tabs / viewpager
private final boolean mCategoryIndicatorEnabled;
private final int mCategoryIndicatorDrawableResId;
private final int mCategoryIndicatorBackgroundResId;
private final int mCategoryPageIndicatorColor;
private final Colors mColors;
private EmojiPalettesAdapter mEmojiPalettesAdapter;
private final EmojiLayoutParams mEmojiLayoutParams;
@ -77,7 +72,6 @@ public final class EmojiPalettesView extends LinearLayout
private final EmojiCategory mEmojiCategory;
private ImageView mCurrentTab = null;
public EmojiPalettesView(final Context context, final AttributeSet attrs) {
this(context, attrs, R.attr.emojiPalettesViewStyle);
@ -96,14 +90,6 @@ public final class EmojiPalettesView extends LinearLayout
final TypedArray emojiPalettesViewAttr = context.obtainStyledAttributes(attrs,
R.styleable.EmojiPalettesView, defStyle, R.style.EmojiPalettesView);
mEmojiCategory = new EmojiCategory(context, layoutSet, emojiPalettesViewAttr);
mCategoryIndicatorEnabled = emojiPalettesViewAttr.getBoolean(
R.styleable.EmojiPalettesView_categoryIndicatorEnabled, false);
mCategoryIndicatorDrawableResId = emojiPalettesViewAttr.getResourceId(
R.styleable.EmojiPalettesView_categoryIndicatorDrawable, 0);
mCategoryIndicatorBackgroundResId = emojiPalettesViewAttr.getResourceId(
R.styleable.EmojiPalettesView_categoryIndicatorBackground, 0);
mCategoryPageIndicatorColor = emojiPalettesViewAttr.getColor( // todo: remove this and related attr
R.styleable.EmojiPalettesView_categoryPageIndicatorColor, 0);
emojiPalettesViewAttr.recycle();
mEmojiLayoutManager = new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false);
setFitsSystemWindows(true);
@ -122,13 +108,6 @@ public final class EmojiPalettesView extends LinearLayout
setMeasuredDimension(width, height);
}
// todo (maybe): bring back the holo indicator thing?
// just some 2 dp high strip
// would probably need a vertical linear layout
// better not, would complicate stuff again
// when decided to definitely not bring it back:
// remove mCategoryIndicatorEnabled, mCategoryIndicatorDrawableResId, mCategoryIndicatorBackgroundResId
// and the attrs categoryIndicatorDrawable, categoryIndicatorEnabled, categoryIndicatorBackground (and the connected drawables)
private void addTab(final LinearLayout host, final int categoryId) {
final ImageView iconView = new ImageView(getContext());
mColors.setBackground(iconView, ColorType.STRIP_BACKGROUND);
@ -150,18 +129,6 @@ public final class EmojiPalettesView extends LinearLayout
for (final EmojiCategory.CategoryProperties properties : mEmojiCategory.getShownCategories()) {
addTab(mTabStrip, properties.mCategoryId);
}
// mTabStrip.setOnTabChangedListener(this); // now onClickListener
/* final TabWidget tabWidget = mTabStrip.getTabWidget();
tabWidget.setStripEnabled(mCategoryIndicatorEnabled);
if (mCategoryIndicatorEnabled) {
// On TabWidget's strip, what looks like an indicator is actually a background.
// And what looks like a background are actually left and right drawables.
tabWidget.setBackgroundResource(mCategoryIndicatorDrawableResId);
tabWidget.setLeftStripDrawable(mCategoryIndicatorBackgroundResId);
tabWidget.setRightStripDrawable(mCategoryIndicatorBackgroundResId);
tabWidget.setBackgroundColor(mColors.get(ColorType.EMOJI_CATEGORY_SELECTED));
}
*/
mEmojiPalettesAdapter = new EmojiPalettesAdapter(mEmojiCategory, this);
mEmojiRecyclerView = findViewById(R.id.emoji_keyboard_list);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -156,10 +156,6 @@
</declare-styleable>
<declare-styleable name="EmojiPalettesView">
<attr name="categoryIndicatorEnabled" format="boolean" />
<attr name="categoryIndicatorDrawable" format="reference" />
<attr name="categoryIndicatorBackground" format="reference" />
<attr name="categoryPageIndicatorColor" format="color" />
<attr name="categoryPageIndicatorBackground" format="color" />
<attr name="iconEmojiRecentsTab" format="reference" />
<attr name="iconEmojiCategory1Tab" format="reference" />

View file

@ -68,10 +68,6 @@
name="EmojiPalettesView.HoloBase"
parent="MainKeyboardView.HoloBase"
>
<item name="categoryIndicatorEnabled">true</item>
<item name="categoryIndicatorDrawable">@drawable/emoji_category_tab_selected_holo_white</item>
<item name="categoryIndicatorBackground">@drawable/emoji_category_tab_unselected_holo_dark</item>
<item name="categoryPageIndicatorColor">@color/highlight_color_holo_white</item>
<item name="categoryPageIndicatorBackground">@color/emoji_tab_page_indicator_background_holo</item>
<item name="iconEmojiRecentsTab">@drawable/ic_emoji_recents</item>
<item name="iconEmojiCategory1Tab">@drawable/ic_emoji_smileys_emotion</item>

View file

@ -54,8 +54,6 @@
name="EmojiPalettesView.LXX_Base"
parent="MainKeyboardView.LXX_Base"
>
<item name="categoryIndicatorEnabled">false</item>
<item name="categoryPageIndicatorColor">@color/highlight_color_lxx_light</item>
<item name="categoryPageIndicatorBackground">@color/emoji_tab_page_indicator_background_lxx_base</item>
<item name="iconEmojiRecentsTab">@drawable/ic_emoji_recents_lxx</item>
<item name="iconEmojiCategory1Tab">@drawable/ic_emoji_smileys_emotion_lxx</item>

View file

@ -61,8 +61,6 @@
name="EmojiPalettesView.Rounded_Base"
parent="MainKeyboardView.Rounded_Base"
>
<item name="categoryIndicatorEnabled">false</item>
<item name="categoryPageIndicatorColor">@color/highlight_color_lxx_light</item>
<item name="categoryPageIndicatorBackground">@color/emoji_tab_page_indicator_background_lxx_base</item>
<item name="iconEmojiRecentsTab">@drawable/ic_emoji_recents_rounded</item>
<item name="iconEmojiCategory1Tab">@drawable/ic_emoji_smileys_emotion_rounded</item>