From 08e992a1ef6b23a5511cedb8558685069b978998 Mon Sep 17 00:00:00 2001 From: liuhuibin Date: Wed, 17 Jul 2024 12:33:18 +0800 Subject: [PATCH] FIX: CustomPhoneKeyboardView.java fix keyboard's size --- .../org/telegram/ui/Components/CustomPhoneKeyboardView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/CustomPhoneKeyboardView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/CustomPhoneKeyboardView.java index fccfd0e23..3c898a1d7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/CustomPhoneKeyboardView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/CustomPhoneKeyboardView.java @@ -211,7 +211,7 @@ public class CustomPhoneKeyboardView extends ViewGroup { @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { int btnWidth = (getWidth() - AndroidUtilities.dp(SIDE_PADDING * 2 + BUTTON_PADDING * 2)) / 3; - int btnHeight = (getHeight() - AndroidUtilities.dp(SIDE_PADDING * 3 + BUTTON_PADDING * 2)) / 4; + int btnHeight = (getHeight() - AndroidUtilities.dp(SIDE_PADDING * 2 + BUTTON_PADDING * 3)) / 4; for (int i = 0; i < views.length; i++) { int rowX = i % 3, rowY = i / 3; @@ -228,7 +228,7 @@ public class CustomPhoneKeyboardView extends ViewGroup { setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec)); int btnWidth = (getWidth() - AndroidUtilities.dp(SIDE_PADDING * 2 + BUTTON_PADDING * 2)) / 3; - int btnHeight = (getHeight() - AndroidUtilities.dp(SIDE_PADDING * 3 + BUTTON_PADDING * 2)) / 4; + int btnHeight = (getHeight() - AndroidUtilities.dp(SIDE_PADDING * 2 + BUTTON_PADDING * 3)) / 4; for (View v : views) { if (v != null) {