This commit is contained in:
PavelRatushny 2017-10-27 11:53:30 +03:00
parent 8809f9b5b4
commit 4938701560
3 changed files with 45 additions and 40 deletions

View file

@ -18,22 +18,33 @@
android:layout_height="wrap_content"
android:paddingBottom="12dp"
android:paddingTop="12dp"
osmand:contentInsetLeft="54dp"
osmand:contentInsetStart="54dp">
osmand:contentInsetLeft="4dp"
osmand:contentInsetStart="4dp"
osmand:contentInsetRight="16dp"
osmand:contentInsetEnd="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp">
android:orientation="horizontal">
<ImageButton
android:id="@+id/back_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_arrow_back"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"/>
<net.osmand.plus.OsmandTextFieldBoxes
android:id="@+id/latitude_box"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
osmand:labelText="@string/navigate_point_latitude">
osmand:labelText="@string/navigate_point_latitude"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp">
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
android:id="@+id/latitude_edit_text"
@ -43,16 +54,14 @@
</net.osmand.plus.OsmandTextFieldBoxes>
<View
android:layout_width="12dp"
android:layout_height="match_parent"/>
<net.osmand.plus.OsmandTextFieldBoxes
android:id="@+id/longitude_box"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
osmand:labelText="@string/navigate_point_longitude">
osmand:labelText="@string/navigate_point_longitude"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp">
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
android:id="@+id/longitude_edit_text"
@ -62,16 +71,14 @@
</net.osmand.plus.OsmandTextFieldBoxes>
<View
android:layout_width="12dp"
android:layout_height="match_parent"/>
<net.osmand.plus.OsmandTextFieldBoxes
android:id="@+id/name_box"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
osmand:labelText="@string/shared_string_name">
osmand:labelText="@string/shared_string_name"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp">
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
android:id="@+id/name_edit_text"
@ -82,15 +89,11 @@
</net.osmand.plus.OsmandTextFieldBoxes>
<View
android:layout_width="10dp"
android:layout_height="match_parent"/>
<ImageButton
android:id="@+id/options_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_overflow_menu_white"/>
</LinearLayout>

View file

@ -21,8 +21,10 @@
android:id="@+id/coordinate_input_toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/dashboard_map_toolbar"
osmand:contentInsetLeft="54dp"
osmand:contentInsetStart="54dp">
osmand:contentInsetLeft="4dp"
osmand:contentInsetStart="4dp"
osmand:contentInsetRight="16dp"
osmand:contentInsetEnd="16dp">
<LinearLayout
android:orientation="horizontal"
@ -30,6 +32,15 @@
android:layout_height="match_parent"
android:gravity="center_vertical">
<ImageButton
android:id="@+id/back_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_arrow_back"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"/>
<net.osmand.plus.widgets.TextViewEx
android:layout_width="0dp"
android:layout_weight="1"
@ -49,8 +60,6 @@
android:gravity="center_vertical"
android:ellipsize="end"
android:maxLines="1"
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:text="@string/shared_string_options"
osmand:typeface="@string/font_roboto_regular"
android:textAllCaps="true"
@ -73,7 +82,9 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
osmand:labelText="@string/navigate_point_latitude">
osmand:labelText="@string/navigate_point_latitude"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp">
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
android:inputType="number"
@ -83,10 +94,6 @@
</net.osmand.plus.OsmandTextFieldBoxes>
<View
android:layout_width="16dp"
android:layout_height="match_parent"/>
<net.osmand.plus.OsmandTextFieldBoxes
android:id="@+id/longitude_box"
android:layout_width="0dp"
@ -115,7 +122,9 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
osmand:labelText="@string/shared_string_name">
osmand:labelText="@string/shared_string_name"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp">
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
android:inputType="text"
@ -126,10 +135,6 @@
</net.osmand.plus.OsmandTextFieldBoxes>
<View
android:layout_width="16dp"
android:layout_height="match_parent"/>
<View
android:layout_width="0dp"
android:layout_weight="1"

View file

@ -140,10 +140,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
((CoordinateInputBottomSheetDialogFragment) coordinateInputBottomSheetDialogFragment).setListener(createCoordinateInputFormatChangeListener());
}
Toolbar toolbar = (Toolbar) mainView.findViewById(R.id.coordinate_input_toolbar);
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
mainView.findViewById(R.id.back_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
saveMarkers();