mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
More FAB tidying
This commit is contained in:
parent
11d3517b70
commit
3bd4214246
1 changed files with 20 additions and 19 deletions
|
|
@ -311,6 +311,23 @@ public class ShareActivity
|
||||||
Log.i("exception", e.toString());
|
Log.i("exception", e.toString());
|
||||||
}
|
}
|
||||||
zoomOutButton = (FloatingActionButton) findViewById(R.id.media_upload_zoom_out);
|
zoomOutButton = (FloatingActionButton) findViewById(R.id.media_upload_zoom_out);
|
||||||
|
|
||||||
|
maps_fragment = (FloatingActionButton) findViewById(R.id.media_map);
|
||||||
|
maps_fragment.setVisibility(View.VISIBLE);
|
||||||
|
if( imageObj == null || imageObj.imageCoordsExists){
|
||||||
|
maps_fragment.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
maps_fragment.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if( imageObj != null && imageObj.imageCoordsExists) {
|
||||||
|
Uri gmmIntentUri = Uri.parse("google.streetview:cbll=" + imageObj.getDecLatitude() + "," + imageObj.getDecLongitude());
|
||||||
|
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
|
||||||
|
mapIntent.setPackage("com.google.android.apps.maps");
|
||||||
|
startActivity(mapIntent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -368,22 +385,6 @@ public class ShareActivity
|
||||||
.commitAllowingStateLoss();
|
.commitAllowingStateLoss();
|
||||||
}
|
}
|
||||||
uploadController.prepareService();
|
uploadController.prepareService();
|
||||||
maps_fragment = (FloatingActionButton) findViewById(R.id.media_map);
|
|
||||||
maps_fragment.setVisibility(View.VISIBLE);
|
|
||||||
if( imageObj == null || imageObj.imageCoordsExists){
|
|
||||||
maps_fragment.setVisibility(View.INVISIBLE);
|
|
||||||
}
|
|
||||||
maps_fragment.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if( imageObj != null && imageObj.imageCoordsExists) {
|
|
||||||
Uri gmmIntentUri = Uri.parse("google.streetview:cbll=" + imageObj.getDecLatitude() + "," + imageObj.getDecLongitude());
|
|
||||||
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
|
|
||||||
mapIntent.setPackage("com.google.android.apps.maps");
|
|
||||||
startActivity(mapIntent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue