Merge branch 'sasha_pasha_branch' of ssh://github.com/osmandapp/Osmand into sasha_pasha_branch
This commit is contained in:
commit
1514949336
5 changed files with 26 additions and 11 deletions
|
@ -20,6 +20,7 @@
|
|||
android:id="@+id/up_down_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingTop="12dp">
|
||||
|
||||
|
@ -116,7 +117,7 @@
|
|||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@null"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingBottom="14dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingLeft="16dp"
|
||||
|
@ -132,7 +133,7 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/undo_point_button"
|
||||
android:layout_toRightOf="@id/undo_point_button"
|
||||
android:background="@null"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingBottom="14dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingLeft="12dp"
|
||||
|
|
|
@ -4,19 +4,30 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/measure_point_icon"
|
||||
android:id="@+id/measure_point_reorder_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:tint="?attr/secondary_icon_color"
|
||||
tools:src="@drawable/ic_action_reorder"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatImageView
|
||||
android:id="@+id/measure_point_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toEndOf="@id/measure_point_reorder_icon"
|
||||
android:layout_toRightOf="@id/measure_point_reorder_icon"
|
||||
tools:src="@drawable/ic_action_measure_point"/>
|
||||
|
||||
<ImageButton
|
||||
|
@ -26,7 +37,7 @@
|
|||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@null"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:focusableInTouchMode="true"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingEnd="16dp"
|
||||
|
@ -66,8 +77,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toEndOf="@+id/measure_point_icon"
|
||||
android:layout_toRightOf="@+id/measure_point_icon"
|
||||
android:layout_toEndOf="@+id/measure_point_reorder_icon"
|
||||
android:layout_toRightOf="@+id/measure_point_reorder_icon"
|
||||
android:background="?attr/dashboard_divider"/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -790,7 +790,7 @@
|
|||
<string name="shared_string_clear">Clear</string>
|
||||
<string name="shared_string_clear_all">Clear all</string>
|
||||
<string name="shared_string_save">Save</string>
|
||||
<string name="shared_string_save_as_gpx">Save as GPX track</string>
|
||||
<string name="shared_string_save_as_gpx">Save as Track</string>
|
||||
<string name="shared_string_rename">Rename</string>
|
||||
<string name="shared_string_delete">Delete</string>
|
||||
<string name="shared_string_delete_all">Delete all</string>
|
||||
|
|
|
@ -51,6 +51,7 @@ class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementToolAdapter
|
|||
@Override
|
||||
public void onBindViewHolder(final Holder holder, int pos) {
|
||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
||||
holder.iconReorder.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_reorder));
|
||||
holder.icon.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_measure_point));
|
||||
holder.title.setText(mapActivity.getString(R.string.plugin_distance_point) + " - " + (pos + 1));
|
||||
if (pos < 1) {
|
||||
|
@ -79,6 +80,7 @@ class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementToolAdapter
|
|||
|
||||
static class Holder extends RecyclerView.ViewHolder {
|
||||
|
||||
final ImageView iconReorder;
|
||||
final ImageView icon;
|
||||
final TextView title;
|
||||
final TextView descr;
|
||||
|
@ -86,6 +88,7 @@ class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementToolAdapter
|
|||
|
||||
Holder(View view) {
|
||||
super(view);
|
||||
iconReorder = (ImageView) view.findViewById(R.id.measure_point_reorder_icon);
|
||||
icon = (ImageView) view.findViewById(R.id.measure_point_icon);
|
||||
title = (TextView) view.findViewById(R.id.measure_point_title);
|
||||
descr = (TextView) view.findViewById(R.id.measure_point_descr);
|
||||
|
|
|
@ -112,7 +112,7 @@ public class MeasurementToolFragment extends Fragment {
|
|||
mainView.findViewById(R.id.up_down_row).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (!pointsListOpened) {
|
||||
if (!pointsListOpened && measurementLayer.getPointsCount() > 0) {
|
||||
showPointsList(mainView, iconsCache.getThemedIcon(R.drawable.ic_action_arrow_down));
|
||||
} else {
|
||||
hidePointsList(mainView, iconsCache.getThemedIcon(R.drawable.ic_action_arrow_up));
|
||||
|
|
Loading…
Reference in a new issue