mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
More FAB tidying
This commit is contained in:
parent
11d3517b70
commit
3bd4214246
1 changed files with 20 additions and 19 deletions
|
|
@ -291,9 +291,9 @@ public class ShareActivity
|
|||
mainFab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(!isFABOpen){
|
||||
if(!isFABOpen) {
|
||||
showFABMenu();
|
||||
}else{
|
||||
} else {
|
||||
closeFABMenu();
|
||||
}
|
||||
}
|
||||
|
|
@ -307,10 +307,27 @@ public class ShareActivity
|
|||
zoomImageFromThumb(backgroundImageView, mediaUri);
|
||||
}
|
||||
});
|
||||
} catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
Log.i("exception", e.toString());
|
||||
}
|
||||
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
|
||||
|
|
@ -368,22 +385,6 @@ public class ShareActivity
|
|||
.commitAllowingStateLoss();
|
||||
}
|
||||
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