Open new markers by more button and fix done icon
This commit is contained in:
parent
0b7d3d03b5
commit
1a500b3242
6 changed files with 49 additions and 27 deletions
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/marker_circle_background_on_map_n"
|
||||
android:insetBottom="11dp"
|
||||
android:insetLeft="11dp"
|
||||
android:insetRight="11dp"
|
||||
android:insetTop="11dp"/>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/marker_circle_background_p"
|
||||
android:insetBottom="11dp"
|
||||
android:insetLeft="11dp"
|
||||
android:insetRight="11dp"
|
||||
android:insetTop="11dp">
|
||||
|
||||
</inset>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/marker_circle_background_top_bar_p_with_inset" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/marker_circle_background_top_bar_n_with_inset"/>
|
||||
</selector>
|
|
@ -80,11 +80,11 @@
|
|||
|
||||
<ImageButton
|
||||
android:id="@+id/marker_btn_ok"
|
||||
android:contentDescription="@string/shared_string_remove"
|
||||
android:contentDescription="@string/move_to_history"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_action_done"/>
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/marker_circle_background_top_bar_with_inset"
|
||||
tools:src="@drawable/ic_action_marker_passed"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/marker_btn_more"
|
||||
|
@ -92,7 +92,7 @@
|
|||
android:layout_width="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_overflow_menu_white"/>
|
||||
android:src="@drawable/ic_action_markers_list"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -157,12 +157,12 @@
|
|||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/marker_btn_ok_2dn"
|
||||
android:contentDescription="@string/shared_string_remove"
|
||||
android:id="@+id/marker_btn_ok_2nd"
|
||||
android:contentDescription="@string/move_to_history"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_action_done"/>
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/marker_circle_background_top_bar_with_inset"
|
||||
tools:src="@drawable/ic_action_marker_passed"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/marker_btn_more_2nd"
|
||||
|
@ -170,7 +170,7 @@
|
|||
android:layout_width="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_overflow_menu_white"/>
|
||||
android:src="@drawable/ic_action_markers_list"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -351,11 +351,11 @@
|
|||
|
||||
<ImageButton
|
||||
android:id="@+id/marker_btn_ok"
|
||||
android:contentDescription="@string/shared_string_remove"
|
||||
android:contentDescription="@string/move_to_history"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_action_done"/>
|
||||
android:background="@drawable/marker_circle_background_top_bar_with_inset"
|
||||
tools:src="@drawable/ic_action_marker_passed"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/marker_btn_more"
|
||||
|
@ -363,7 +363,7 @@
|
|||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_overflow_menu_white"/>
|
||||
android:src="@drawable/ic_action_markers_list"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -433,12 +433,12 @@
|
|||
</RelativeLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/marker_btn_ok_2dn"
|
||||
android:contentDescription="@string/shared_string_remove"
|
||||
android:id="@+id/marker_btn_ok_2nd"
|
||||
android:contentDescription="@string/move_to_history"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_action_done"/>
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/marker_circle_background_top_bar_with_inset"
|
||||
tools:src="@drawable/ic_action_marker_passed"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -17,9 +17,8 @@ import net.osmand.plus.activities.MapActivity;
|
|||
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||
import net.osmand.plus.dashboard.DashboardOnMap;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||
import net.osmand.plus.mapmarkers.MapMarkersDialogFragment;
|
||||
import net.osmand.plus.views.AnimateDraggingMapThread;
|
||||
import net.osmand.plus.views.DirectionDrawable;
|
||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
|
@ -75,7 +74,7 @@ public class MapMarkersWidgetsFactory {
|
|||
addressText = (TextView) map.findViewById(R.id.map_marker_address);
|
||||
addressText2nd = (TextView) map.findViewById(R.id.map_marker_address_2nd);
|
||||
okButton = (ImageButton) map.findViewById(R.id.marker_btn_ok);
|
||||
okButton2nd = (ImageButton) map.findViewById(R.id.marker_btn_ok_2dn);
|
||||
okButton2nd = (ImageButton) map.findViewById(R.id.marker_btn_ok_2nd);
|
||||
moreButton = (ImageButton) map.findViewById(R.id.marker_btn_more);
|
||||
moreButton2nd = (ImageButton) map.findViewById(R.id.marker_btn_more_2nd);
|
||||
|
||||
|
@ -96,17 +95,17 @@ public class MapMarkersWidgetsFactory {
|
|||
if (isLandscapeLayout() && helper.getMapMarkers().size() > 1) {
|
||||
moreButton.setVisibility(View.GONE);
|
||||
} else {
|
||||
moreButton.setImageDrawable(iconsCache.getIcon(R.drawable.ic_overflow_menu_white, R.color.marker_top_2nd_line_color));
|
||||
moreButton.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_markers_list, R.color.marker_top_2nd_line_color));
|
||||
moreButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MapActivity.clearPrevActivityIntent();
|
||||
map.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.MAP_MARKERS);
|
||||
MapMarkersDialogFragment.showInstance(map);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (moreButton2nd != null) {
|
||||
moreButton2nd.setImageDrawable(iconsCache.getIcon(R.drawable.ic_overflow_menu_white, R.color.marker_top_2nd_line_color));
|
||||
moreButton2nd.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_markers_list, R.color.marker_top_2nd_line_color));
|
||||
moreButton2nd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -115,12 +114,14 @@ public class MapMarkersWidgetsFactory {
|
|||
}
|
||||
});
|
||||
}
|
||||
okButton.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_marker_passed, R.color.color_white));
|
||||
okButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
removeMarker(0);
|
||||
}
|
||||
});
|
||||
okButton2nd.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_marker_passed, R.color.color_white));
|
||||
okButton2nd.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -270,7 +271,7 @@ public class MapMarkersWidgetsFactory {
|
|||
if (txt != null) {
|
||||
distText.setText(txt);
|
||||
}
|
||||
updateVisibility(okButton, !customLocation && loc != null && dist < MIN_DIST_OK_VISIBLE);
|
||||
// updateVisibility(okButton, !customLocation && loc != null && dist < MIN_DIST_OK_VISIBLE);
|
||||
|
||||
String descr;
|
||||
PointDescription pd = marker.getPointDescription(map);
|
||||
|
|
Loading…
Reference in a new issue