Context menu small refactor, make left icon look nicer
This commit is contained in:
parent
212f9cbe75
commit
52d1376815
17 changed files with 10 additions and 74 deletions
|
@ -43,12 +43,11 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/context_menu_icon_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_width="@dimen/standard_icon_size"
|
||||
android:layout_height="@dimen/standard_icon_size"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_action_building_number"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -15,12 +15,11 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/context_menu_icon_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_width="@dimen/standard_icon_size"
|
||||
android:layout_height="@dimen/standard_icon_size"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_action_building_number"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -531,7 +531,7 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents {
|
|||
iconLayout.setVisibility(View.VISIBLE);
|
||||
} else if (iconId != 0) {
|
||||
iconView.setImageDrawable(iconsCache.getIcon(iconId,
|
||||
light ? R.color.osmand_orange : R.color.osmand_orange_dark, 0.75f));
|
||||
light ? R.color.osmand_orange : R.color.osmand_orange_dark));
|
||||
iconLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
iconLayout.setVisibility(View.GONE);
|
||||
|
|
|
@ -75,9 +75,4 @@ public class AmenityMenuController extends MenuController {
|
|||
}
|
||||
addMyLocationToPlainItems(pointDescription, amenity.getLocation());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,11 +85,6 @@ public class AudioVideoNoteMenuController extends MenuController {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
return recording.getType(getMapActivity());
|
||||
|
|
|
@ -134,11 +134,6 @@ public class EditPOIMenuController extends MenuController {
|
|||
return getIcon(R.drawable.ic_action_gabout_dark, R.color.osmand_orange_dark, R.color.osmand_orange);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
return pointTypeStr;
|
||||
|
|
|
@ -55,7 +55,7 @@ public class FavouritePointMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public Drawable getLeftIcon() {
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity().getMyApplication(), fav.getColor(), true);
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity().getMyApplication(), fav.getColor(), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -73,9 +73,4 @@ public class FavouritePointMenuController extends MenuController {
|
|||
return fav.getCategory().length() == 0 ?
|
||||
getMapActivity().getString(R.string.shared_string_favorites) : fav.getCategory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,11 +50,6 @@ public class HistoryMenuController extends MenuController {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
if (needTypeStr()) {
|
||||
|
|
|
@ -35,7 +35,6 @@ public class MapDataMenuController extends MenuController {
|
|||
private WorldRegion region;
|
||||
private IndexItem indexItem;
|
||||
private List<IndexItem> otherIndexItems;
|
||||
private String name;
|
||||
|
||||
private DownloadValidationManager downloadValidationManager;
|
||||
private DownloadIndexesThread downloadThread;
|
||||
|
@ -45,7 +44,6 @@ public class MapDataMenuController extends MenuController {
|
|||
OsmandRegions osmandRegions = app.getRegions();
|
||||
String fullName = osmandRegions.getFullName(dataObject);
|
||||
this.region = osmandRegions.getRegionData(fullName);
|
||||
name = getPointDescription().getName();
|
||||
downloadValidationManager = new DownloadValidationManager(app);
|
||||
downloadThread = app.getDownloadThread();
|
||||
|
||||
|
@ -120,11 +118,6 @@ public class MapDataMenuController extends MenuController {
|
|||
return getIcon(R.drawable.ic_map, R.color.osmand_orange_dark, R.color.osmand_orange);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
String res;
|
||||
|
|
|
@ -25,9 +25,4 @@ public class MyLocationMenuController extends MenuController {
|
|||
ApplicationMode appMode = getMapActivity().getMyApplication().getSettings().getApplicationMode();
|
||||
return getMapActivity().getResources().getDrawable(appMode.getResourceLocation());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,11 +40,6 @@ public class OsMoMenuController extends MenuController {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
OsmandApplication app = getMapActivity().getMyApplication();
|
||||
|
|
|
@ -61,11 +61,6 @@ public class ParkingPositionMenuController extends MenuController {
|
|||
return getIcon(R.drawable.ic_action_parking_dark, R.color.map_widget_blue, R.color.osmand_orange);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
return parkingDescription;
|
||||
|
|
|
@ -52,11 +52,6 @@ public class PointDescriptionMenuController extends MenuController {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
if (needTypeStr()) {
|
||||
|
|
|
@ -68,11 +68,6 @@ public class TargetPointMenuController extends MenuController {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
return targetPoint.getPointDescription(getMapActivity()).getTypeName();
|
||||
|
|
|
@ -70,9 +70,4 @@ public class WptPtMenuController extends MenuController {
|
|||
public String getTypeStr() {
|
||||
return wpt.category != null ? wpt.category : getMapActivity().getString(R.string.shared_string_none);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ public class FavoritePointEditorFragment extends PointEditorFragment {
|
|||
if (group != null) {
|
||||
color = group.color;
|
||||
}
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity(), color, true);
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity(), color, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -142,7 +142,7 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi
|
|||
iconLayout.setVisibility(View.VISIBLE);
|
||||
} else if (iconId != 0) {
|
||||
iconView.setImageDrawable(iconsCache.getIcon(iconId,
|
||||
menu.isLight() ? R.color.osmand_orange : R.color.osmand_orange_dark, 0.75f));
|
||||
menu.isLight() ? R.color.osmand_orange : R.color.osmand_orange_dark));
|
||||
iconLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
iconLayout.setVisibility(View.GONE);
|
||||
|
|
Loading…
Reference in a new issue