mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Tidy initViewsAndListeners()
This commit is contained in:
parent
3bd4214246
commit
478c4900df
1 changed files with 6 additions and 5 deletions
|
|
@ -286,8 +286,12 @@ public class ShareActivity
|
||||||
* Initialize views and setup listeners here for FAB to prevent cluttering onCreate
|
* Initialize views and setup listeners here for FAB to prevent cluttering onCreate
|
||||||
*/
|
*/
|
||||||
private void initViewsAndListeners() {
|
private void initViewsAndListeners() {
|
||||||
|
//Main FAB splits into Zoom and Map
|
||||||
mainFab = (FloatingActionButton) findViewById(R.id.main_fab);
|
mainFab = (FloatingActionButton) findViewById(R.id.main_fab);
|
||||||
//called when upper arrow floating button
|
zoomInButton = (FloatingActionButton) findViewById(R.id.media_upload_zoom_in);
|
||||||
|
zoomOutButton = (FloatingActionButton) findViewById(R.id.media_upload_zoom_out);
|
||||||
|
maps_fragment = (FloatingActionButton) findViewById(R.id.media_map);
|
||||||
|
|
||||||
mainFab.setOnClickListener(new View.OnClickListener() {
|
mainFab.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
@ -299,7 +303,6 @@ public class ShareActivity
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
zoomInButton = (FloatingActionButton) findViewById(R.id.media_upload_zoom_in);
|
|
||||||
try {
|
try {
|
||||||
zoomInButton.setOnClickListener(new View.OnClickListener() {
|
zoomInButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -308,11 +311,9 @@ public class ShareActivity
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.i("exception", e.toString());
|
Timber.e(e);
|
||||||
}
|
}
|
||||||
zoomOutButton = (FloatingActionButton) findViewById(R.id.media_upload_zoom_out);
|
|
||||||
|
|
||||||
maps_fragment = (FloatingActionButton) findViewById(R.id.media_map);
|
|
||||||
maps_fragment.setVisibility(View.VISIBLE);
|
maps_fragment.setVisibility(View.VISIBLE);
|
||||||
if( imageObj == null || imageObj.imageCoordsExists){
|
if( imageObj == null || imageObj.imageCoordsExists){
|
||||||
maps_fragment.setVisibility(View.INVISIBLE);
|
maps_fragment.setVisibility(View.INVISIBLE);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue