revert 882 sticker tab height

This commit is contained in:
luvletter2333 2022-07-07 16:45:49 +08:00
parent ac8950ad0f
commit 6e17a698e0
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
2 changed files with 9 additions and 8 deletions

View File

@ -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);
views.add(stickersContainer);
stickersSearchGridAdapter = new StickersSearchGridAdapter(context);
@ -1910,7 +1910,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
canvas.clipRect(0, searchProgressOffset, getMeasuredWidth(), getMeasuredHeight());
}
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);
stickersTab.drawOverlays(canvas);
canvas.restore();
@ -1922,10 +1922,10 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific
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));
} 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();
stickersTab.setDelegate(page -> {

View File

@ -23,10 +23,11 @@ public class StickerTabView extends FrameLayout {
public final static int ICON_TYPE = 1;
public final static int EMOJI_TYPE = 2;
public final static int SMALL_WIDTH = 38;
public final static int SMALL_HEIGHT = 36;
public final static int SMALL_WIDTH = 52;
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 float dragOffset;
@ -55,7 +56,7 @@ public class StickerTabView extends FrameLayout {
imageView = new BackupImageView(getContext());
imageView.setLayerNum(1);
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;
} else if (type == ICON_TYPE) {
iconView = new ImageView(context);