Remove backspace buttons in input data area

This commit is contained in:
Alexander Sytnyk 2018-02-19 12:50:48 +02:00
parent 8057122222
commit 1ce82eaccd
2 changed files with 5 additions and 55 deletions

View file

@ -64,6 +64,8 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
@ -137,23 +139,6 @@
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/lat_backspace_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/text_margin_small"
android:layout_marginLeft="@dimen/context_menu_padding_margin_large"
android:layout_marginRight="@dimen/text_margin_small"
android:layout_marginStart="@dimen/context_menu_padding_margin_large"
android:padding="@dimen/content_padding_small"
tools:src="@drawable/ic_keyboard_backspace"/>
<View
android:id="@+id/lat_end_padding"
android:layout_width="@dimen/content_padding"
android:layout_height="match_parent"
android:visibility="gone"/>
</LinearLayout> </LinearLayout>
<!-- Longitude row: --> <!-- Longitude row: -->
@ -208,6 +193,8 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
@ -281,23 +268,6 @@
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/lon_backspace_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/text_margin_small"
android:layout_marginLeft="@dimen/context_menu_padding_margin_large"
android:layout_marginRight="@dimen/text_margin_small"
android:layout_marginStart="@dimen/context_menu_padding_margin_large"
android:padding="@dimen/content_padding_small"
tools:src="@drawable/ic_keyboard_backspace"/>
<View
android:id="@+id/lon_end_padding"
android:layout_width="@dimen/content_padding"
android:layout_height="match_parent"
android:visibility="gone"/>
</LinearLayout> </LinearLayout>
<!-- Point name row: --> <!-- Point name row: -->

View file

@ -201,22 +201,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
final Context ctx = getContext(); final Context ctx = getContext();
if (orientationPortrait) { if (!orientationPortrait) {
View.OnClickListener backspaceOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(ctx, "backspace", Toast.LENGTH_SHORT).show();
}
};
ImageView latBackspaceBtn = (ImageView) mainView.findViewById(R.id.lat_backspace_btn);
latBackspaceBtn.setImageDrawable(getActiveIcon(R.drawable.ic_keyboard_backspace));
latBackspaceBtn.setOnClickListener(backspaceOnClickListener);
ImageView lonBackspaceBtn = (ImageView) mainView.findViewById(R.id.lon_backspace_btn);
lonBackspaceBtn.setImageDrawable(getActiveIcon(R.drawable.ic_keyboard_backspace));
lonBackspaceBtn.setOnClickListener(backspaceOnClickListener);
} else {
boolean rightHand = getMyApplication().getSettings().COORDS_INPUT_USE_RIGHT_SIDE.get(); boolean rightHand = getMyApplication().getSettings().COORDS_INPUT_USE_RIGHT_SIDE.get();
LinearLayout handContainer = (LinearLayout) mainView.findViewById(R.id.hand_container); LinearLayout handContainer = (LinearLayout) mainView.findViewById(R.id.hand_container);
@ -232,11 +217,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
handContainer.findViewById(R.id.point_name_top_space).setVisibility(View.VISIBLE); handContainer.findViewById(R.id.point_name_top_space).setVisibility(View.VISIBLE);
handContainer.findViewById(R.id.right_shadow).setVisibility(rightHand ? View.VISIBLE : View.GONE); handContainer.findViewById(R.id.right_shadow).setVisibility(rightHand ? View.VISIBLE : View.GONE);
handContainer.findViewById(R.id.left_shadow).setVisibility(rightHand ? View.GONE : View.VISIBLE); handContainer.findViewById(R.id.left_shadow).setVisibility(rightHand ? View.GONE : View.VISIBLE);
handContainer.findViewById(R.id.lat_backspace_btn).setVisibility(View.GONE);
handContainer.findViewById(R.id.lon_backspace_btn).setVisibility(View.GONE);
handContainer.findViewById(R.id.lat_end_padding).setVisibility(View.VISIBLE);
handContainer.findViewById(R.id.lon_end_padding).setVisibility(View.VISIBLE);
} }
registerInputs(); registerInputs();