mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 14:35:03 +01:00
FIX: CustomPhoneKeyboardView.java fix keyboard's size
This commit is contained in:
parent
5fa5549a4a
commit
08e992a1ef
1 changed files with 2 additions and 2 deletions
|
@ -211,7 +211,7 @@ public class CustomPhoneKeyboardView extends ViewGroup {
|
||||||
@Override
|
@Override
|
||||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
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 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++) {
|
for (int i = 0; i < views.length; i++) {
|
||||||
int rowX = i % 3, rowY = i / 3;
|
int rowX = i % 3, rowY = i / 3;
|
||||||
|
@ -228,7 +228,7 @@ public class CustomPhoneKeyboardView extends ViewGroup {
|
||||||
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec));
|
setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec));
|
||||||
|
|
||||||
int btnWidth = (getWidth() - AndroidUtilities.dp(SIDE_PADDING * 2 + BUTTON_PADDING * 2)) / 3;
|
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) {
|
for (View v : views) {
|
||||||
if (v != null) {
|
if (v != null) {
|
||||||
|
|
Loading…
Reference in a new issue