Add borders for the controls
This commit is contained in:
parent
4f85af5b10
commit
6714afb316
2 changed files with 61 additions and 49 deletions
|
@ -137,30 +137,39 @@
|
||||||
android:src="@drawable/bg_shadow_onmap"/>
|
android:src="@drawable/bg_shadow_onmap"/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/measure_mode_controls"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp">
|
android:layout_height="52dp">
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<FrameLayout
|
||||||
android:id="@+id/options_button"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:layout_weight="1">
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingEnd="12dp"
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:paddingLeft="16dp"
|
android:id="@+id/options_button"
|
||||||
android:paddingRight="12dp"
|
android:layout_width="wrap_content"
|
||||||
android:paddingStart="16dp"
|
android:layout_height="match_parent"
|
||||||
android:text="@string/shared_string_options"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:textColor="?attr/color_dialog_buttons"
|
android:gravity="center_vertical"
|
||||||
osmand:textAllCapsCompat="true"
|
android:maxLines="1"
|
||||||
osmand:typeface="@string/font_roboto_medium"/>
|
android:paddingEnd="12dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="12dp"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:text="@string/shared_string_options"
|
||||||
|
android:textColor="?attr/color_dialog_buttons"
|
||||||
|
osmand:textAllCapsCompat="true"
|
||||||
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/redo_undo_container"
|
android:id="@+id/redo_undo_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerHorizontal="true">
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/undo_point_button"
|
android:id="@+id/undo_point_button"
|
||||||
|
@ -189,24 +198,37 @@
|
||||||
tools:src="@drawable/ic_action_redo_dark"/>
|
tools:src="@drawable/ic_action_redo_dark"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<Button
|
<FrameLayout
|
||||||
android:id="@+id/add_point_button"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_weight="1">
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_alignParentRight="true"
|
<Button
|
||||||
android:layout_centerVertical="true"
|
android:id="@+id/add_point_button"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_gravity="end"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:layout_marginEnd="8dp"
|
||||||
android:drawableLeft="@drawable/ic_action_plus"
|
android:layout_marginRight="8dp"
|
||||||
android:minHeight="36dp"
|
android:layout_marginTop="8dp"
|
||||||
android:paddingLeft="8dp"
|
android:background="@drawable/btn_round_blue"
|
||||||
android:paddingRight="8dp"
|
android:drawableLeft="@drawable/ic_action_plus"
|
||||||
android:text="@string/shared_string_add"
|
android:maxLines="1"
|
||||||
android:textColor="@color/color_white"/>
|
android:minHeight="36dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:text="@string/shared_string_add"
|
||||||
|
android:textColor="@color/color_white"/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/move_point_mode_controls"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="52dp"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/apply_point_button"
|
android:id="@+id/apply_point_button"
|
||||||
|
@ -224,8 +246,7 @@
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
android:paddingRight="8dp"
|
android:paddingRight="8dp"
|
||||||
android:text="@string/shared_string_apply"
|
android:text="@string/shared_string_apply"
|
||||||
android:textColor="@color/color_white"
|
android:textColor="@color/color_white"/>
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:id="@+id/cancel_point_button"
|
android:id="@+id/cancel_point_button"
|
||||||
|
@ -239,7 +260,6 @@
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:text="@string/shared_string_cancel"
|
android:text="@string/shared_string_cancel"
|
||||||
android:textColor="?attr/color_dialog_buttons"
|
android:textColor="?attr/color_dialog_buttons"
|
||||||
android:visibility="gone"
|
|
||||||
osmand:textAllCapsCompat="true"
|
osmand:textAllCapsCompat="true"
|
||||||
osmand:typeface="@string/font_roboto_medium"/>
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -402,15 +402,11 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
R.id.measurement_distance_text_view,
|
R.id.measurement_distance_text_view,
|
||||||
R.id.measurement_points_text_view,
|
R.id.measurement_points_text_view,
|
||||||
R.id.up_down_button,
|
R.id.up_down_button,
|
||||||
R.id.options_button,
|
R.id.measure_mode_controls);
|
||||||
R.id.undo_point_button,
|
|
||||||
R.id.redo_point_button,
|
|
||||||
R.id.add_point_button);
|
|
||||||
mark(View.VISIBLE,
|
mark(View.VISIBLE,
|
||||||
R.id.move_point_icon,
|
R.id.move_point_icon,
|
||||||
R.id.move_point_text,
|
R.id.move_point_text,
|
||||||
R.id.cancel_point_button,
|
R.id.move_point_mode_controls);
|
||||||
R.id.apply_point_button);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exitMovePointMode() {
|
private void exitMovePointMode() {
|
||||||
|
@ -418,17 +414,13 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
mark(View.GONE,
|
mark(View.GONE,
|
||||||
R.id.move_point_icon,
|
R.id.move_point_icon,
|
||||||
R.id.move_point_text,
|
R.id.move_point_text,
|
||||||
R.id.cancel_point_button,
|
R.id.move_point_mode_controls);
|
||||||
R.id.apply_point_button);
|
|
||||||
mark(View.VISIBLE,
|
mark(View.VISIBLE,
|
||||||
R.id.ruler_icon,
|
R.id.ruler_icon,
|
||||||
R.id.measurement_distance_text_view,
|
R.id.measurement_distance_text_view,
|
||||||
R.id.measurement_points_text_view,
|
R.id.measurement_points_text_view,
|
||||||
R.id.up_down_button,
|
R.id.up_down_button,
|
||||||
R.id.options_button,
|
R.id.measure_mode_controls);
|
||||||
R.id.undo_point_button,
|
|
||||||
R.id.redo_point_button,
|
|
||||||
R.id.add_point_button);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hidePointsListIfNoPoints() {
|
private void hidePointsListIfNoPoints() {
|
||||||
|
|
Loading…
Reference in a new issue