mirror of https://github.com/NekoX-Dev/NekoX.git
revert 882 sticker tab height
This commit is contained in:
parent
ac8950ad0f
commit
6e17a698e0
|
@ -1785,7 +1785,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
stickersGridView.setPadding(0, AndroidUtilities.dp(4 + 36), 0, AndroidUtilities.dp(44));
|
stickersGridView.setPadding(0, AndroidUtilities.dp(4 + 48), 0, AndroidUtilities.dp(44));
|
||||||
stickersGridView.setClipToPadding(false);
|
stickersGridView.setClipToPadding(false);
|
||||||
views.add(stickersContainer);
|
views.add(stickersContainer);
|
||||||
stickersSearchGridAdapter = new StickersSearchGridAdapter(context);
|
stickersSearchGridAdapter = new StickersSearchGridAdapter(context);
|
||||||
|
@ -1910,7 +1910,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||||
canvas.clipRect(0, searchProgressOffset, getMeasuredWidth(), getMeasuredHeight());
|
canvas.clipRect(0, searchProgressOffset, getMeasuredWidth(), getMeasuredHeight());
|
||||||
}
|
}
|
||||||
paint.setColor(getThemedColor(Theme.key_actionBarDefaultSubmenuBackground));
|
paint.setColor(getThemedColor(Theme.key_actionBarDefaultSubmenuBackground));
|
||||||
canvas.drawRect(0, 0, getMeasuredWidth(), AndroidUtilities.dp(36) + stickersTab.getExpandedOffset(), paint);
|
canvas.drawRect(0, 0, getMeasuredWidth(), AndroidUtilities.dp(48) + stickersTab.getExpandedOffset(), paint);
|
||||||
super.dispatchDraw(canvas);
|
super.dispatchDraw(canvas);
|
||||||
stickersTab.drawOverlays(canvas);
|
stickersTab.drawOverlays(canvas);
|
||||||
canvas.restore();
|
canvas.restore();
|
||||||
|
@ -1922,10 +1922,10 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
|
||||||
updateStickerTabsPosition();
|
updateStickerTabsPosition();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
stickersTabContainer.addView(stickersTab, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 36, Gravity.LEFT | Gravity.TOP));
|
stickersTabContainer.addView(stickersTab, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.TOP));
|
||||||
parentView.addView(stickersTabContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
parentView.addView(stickersTabContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
|
||||||
} else {
|
} else {
|
||||||
stickersContainer.addView(stickersTab, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 36, Gravity.LEFT | Gravity.TOP));
|
stickersContainer.addView(stickersTab, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.TOP));
|
||||||
}
|
}
|
||||||
updateStickerTabs();
|
updateStickerTabs();
|
||||||
stickersTab.setDelegate(page -> {
|
stickersTab.setDelegate(page -> {
|
||||||
|
|
|
@ -23,10 +23,11 @@ public class StickerTabView extends FrameLayout {
|
||||||
public final static int ICON_TYPE = 1;
|
public final static int ICON_TYPE = 1;
|
||||||
public final static int EMOJI_TYPE = 2;
|
public final static int EMOJI_TYPE = 2;
|
||||||
|
|
||||||
public final static int SMALL_WIDTH = 38;
|
public final static int SMALL_WIDTH = 52;
|
||||||
public final static int SMALL_HEIGHT = 36;
|
public final static int SMALL_HEIGHT = 48;
|
||||||
|
|
||||||
private final static int IMAGE_SMALL_SIZE = 26;
|
private final static int IMAGE_SMALL_SIZE = 36;
|
||||||
|
private final static int EMOJI_SMALL_SIZE = 30;
|
||||||
|
|
||||||
public int type;
|
public int type;
|
||||||
public float dragOffset;
|
public float dragOffset;
|
||||||
|
@ -55,7 +56,7 @@ public class StickerTabView extends FrameLayout {
|
||||||
imageView = new BackupImageView(getContext());
|
imageView = new BackupImageView(getContext());
|
||||||
imageView.setLayerNum(1);
|
imageView.setLayerNum(1);
|
||||||
imageView.setAspectFit(false);
|
imageView.setAspectFit(false);
|
||||||
addView(imageView, LayoutHelper.createFrame(IMAGE_SMALL_SIZE, IMAGE_SMALL_SIZE, Gravity.CENTER));
|
addView(imageView, LayoutHelper.createFrame(EMOJI_SMALL_SIZE, EMOJI_SMALL_SIZE, Gravity.CENTER));
|
||||||
visibleView = imageView;
|
visibleView = imageView;
|
||||||
} else if (type == ICON_TYPE) {
|
} else if (type == ICON_TYPE) {
|
||||||
iconView = new ImageView(context);
|
iconView = new ImageView(context);
|
||||||
|
|
Loading…
Reference in New Issue