Skip to content
Snippets Groups Projects
Commit 8115bdb4 authored by s22thong's avatar s22thong
Browse files

sdgsfdgsf

parent 70f0eaeb
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,21 @@ public class MapsFragment extends Fragment {
super.onViewCreated(view, savedInstanceState);
toolbar = view.findViewById(R.id.mapsToolbar);
toolbar.inflateMenu(R.menu.menu_maps);
toolbar.setOnMenuItemClickListener(item -> {
if (item.getItemId() == R.id.MapTypeNormalAction) {
shareAction();
return true;
} else if (item.getItemId() == R.id.MapTypeHybridAction) {
openWikipedia();
return true;
} else if (item.getItemId() == R.id.MapTypeSatelliteAction) {
resetAllFields();
return true;
}
return false;
});
SupportMapFragment mapFragment =
(SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
if (mapFragment != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment