use of de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment in project StreetComplete by westnordost.
the class MainActivity method onMapOrientation.
@AnyThread
@Override
public void onMapOrientation(float rotation, float tilt) {
mapRotation = rotation;
mapTilt = tilt;
AbstractQuestAnswerFragment f = getQuestDetailsFragment();
if (f != null) {
f.onMapOrientation(rotation, tilt);
}
}
use of de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment in project StreetComplete by westnordost.
the class MainActivity method showQuestDetails.
@UiThread
private void showQuestDetails(final Quest quest, final QuestGroup group, final Element element) {
if (getBottomSheetFragment() != null) {
closeBottomSheet();
}
lastLocation = mapFragment.getDisplayedLocation();
mapFragment.addQuestGeometry(quest.getGeometry());
AbstractQuestAnswerFragment f = quest.getType().createForm();
Bundle args = QuestAnswerComponent.createArguments(quest.getId(), group);
if (group == QuestGroup.OSM) {
args.putSerializable(AbstractQuestAnswerFragment.ARG_ELEMENT, (OsmElement) element);
}
args.putSerializable(AbstractQuestAnswerFragment.ARG_GEOMETRY, quest.getGeometry());
args.putString(AbstractQuestAnswerFragment.ARG_QUESTTYPE, quest.getType().getClass().getSimpleName());
args.putFloat(AbstractQuestAnswerFragment.ARG_MAP_ROTATION, mapRotation);
args.putFloat(AbstractQuestAnswerFragment.ARG_MAP_TILT, mapTilt);
f.setArguments(args);
showInBottomSheet(f);
}
Aggregations