Fix height

This commit is contained in:
PavelRatushny 2017-11-03 13:52:11 +02:00
parent d8e5de37fe
commit 6c3cb7b98f
3 changed files with 41 additions and 3 deletions

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:id="@+id/keyboard_item_top_spacing"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.3"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/keyboard_item_text"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.4"
android:gravity="center"
android:textAllCaps="true"
android:textColor="?attr/keyboard_item_text_color"
tools:text="3"/>
<View
android:id="@+id/keyboard_item_bottom_spacing"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.3"/>
<ImageView
android:id="@+id/keyboard_item_image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:scaleType="center"
android:tint="?attr/keyboard_item_text_color"
tools:src="@drawable/ic_action_backspace_fill"/>
</LinearLayout>

View file

@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="56dp"
android:orientation="vertical">
<View

View file

@ -789,8 +789,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
int dividerHeight = AndroidUtils.dpToPx(getContext(), 1);
int spaceForKeys = keyboardViewHeight - 3 * dividerHeight;
convertView.setMinimumHeight(spaceForKeys / 4);
} else {
convertView.setMinimumHeight(AndroidUtils.dpToPx(getContext(), 56));
}
boolean controlButton = position == CLEAR_BUTTON_POSITION
|| position == MINUS_BUTTON_POSITION