Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
80b006b08e
3 changed files with 10 additions and 8 deletions
|
@ -37,12 +37,11 @@ import net.osmand.plus.OsmandSettings.OsmandPreference;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.AbstractCard;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.NoImagesCard;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.CardsRowBuilder;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.ImageCard;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.ImageCard.GetImageCardsTask;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.ImageCard.GetImageCardsTask.GetImageCardsListener;
|
||||
import net.osmand.plus.mapillary.AddMapillaryImagesCard;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.NoImagesCard;
|
||||
import net.osmand.plus.render.RenderingIcons;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
||||
|
@ -312,8 +311,6 @@ public class MenuBuilder {
|
|||
cards.addAll(cardList);
|
||||
if (cardList.size() == 0) {
|
||||
cards.add(new NoImagesCard(app));
|
||||
} else {
|
||||
cards.add(new AddMapillaryImagesCard(app));
|
||||
}
|
||||
onlinePhotoCardsRow.setCards(cards);
|
||||
onlinePhotoCards = cards;
|
||||
|
|
|
@ -17,6 +17,7 @@ import net.osmand.data.LatLon;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.Version;
|
||||
import net.osmand.plus.mapillary.MapillaryContributeCard;
|
||||
import net.osmand.plus.mapillary.MapillaryImageCard;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
|
@ -111,6 +112,8 @@ public abstract class ImageCard extends AbstractCard {
|
|||
String type = imageObject.getString("type");
|
||||
if ("mapillary-photo".equals(type)) {
|
||||
imageCard = new MapillaryImageCard(app, imageObject);
|
||||
} else if ("mapillary-contribute".equals(type)) {
|
||||
imageCard = new MapillaryContributeCard(app, imageObject);
|
||||
} else {
|
||||
imageCard = new UrlImageCard(app, imageObject);
|
||||
}
|
||||
|
|
|
@ -4,12 +4,14 @@ import android.view.View;
|
|||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.AbstractCard;
|
||||
import net.osmand.plus.mapcontextmenu.builders.cards.ImageCard;
|
||||
|
||||
public class AddMapillaryImagesCard extends AbstractCard {
|
||||
import org.json.JSONObject;
|
||||
|
||||
public AddMapillaryImagesCard(OsmandApplication app) {
|
||||
super(app);
|
||||
public class MapillaryContributeCard extends ImageCard {
|
||||
|
||||
public MapillaryContributeCard(OsmandApplication app, JSONObject imageObject) {
|
||||
super(app, imageObject);
|
||||
}
|
||||
|
||||
@Override
|
Loading…
Reference in a new issue