@@ -820,15 +820,15 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
820
820
SnackBarHandler .showWithBottomMargin (
821
821
parentView ,
822
822
getString (R .string .new_file_created ),
823
- ( bottomBar .getHeight () * 2 ) - 22 );
823
+ parentView .getHeight () - bottomBar . getTop () );
824
824
}
825
825
// adapter.notifyDataSetChanged();
826
826
} catch (Exception e ) {
827
827
Log .e ("ERROS - uCrop" , imageUri .toString (), e );
828
828
}
829
829
} else
830
830
SnackBarHandler .showWithBottomMargin (
831
- parentView , "errori random" , ( bottomBar .getHeight () * 2 ) - 22 );
831
+ parentView , "errori random" , parentView .getHeight () - bottomBar . getTop () );
832
832
break ;
833
833
default :
834
834
break ;
@@ -871,7 +871,7 @@ private void deleteCurrentMedia() {
871
871
SnackBarHandler .showWithBottomMargin (
872
872
parentView ,
873
873
getString (R .string .trashbin_move_onefile ),
874
- bottomBar .getHeight () + navigationView . getHeight (),
874
+ parentView .getHeight () - bottomBar . getTop (),
875
875
Snackbar .LENGTH_SHORT );
876
876
snackbar .setAction (
877
877
R .string .open ,
@@ -888,7 +888,7 @@ public void onClick(View view) {
888
888
SnackBarHandler .showWithBottomMargin (
889
889
parentView ,
890
890
getApplicationContext ().getString (R .string .photo_deleted_msg ),
891
- bottomBar .getHeight () + navigationView . getHeight ());
891
+ parentView .getHeight () - bottomBar . getTop ());
892
892
snackbar .show ();
893
893
}
894
894
if (!success ) {
@@ -1210,7 +1210,7 @@ public void onClick(DialogInterface dialog, int id) {
1210
1210
SnackBarHandler .showWithBottomMargin (
1211
1211
parentView ,
1212
1212
getString (R .string .photo_deleted_from_fav_msg ),
1213
- ( bottomBar .getHeight () * 2 ) - 22 );
1213
+ parentView .getHeight () - bottomBar . getTop () );
1214
1214
}
1215
1215
});
1216
1216
AlertDialog alertDialog = deleteDialog .create ();
@@ -1258,7 +1258,7 @@ public void folderSelected(String path) {
1258
1258
SnackBarHandler .showWithBottomMargin (
1259
1259
relativeLayout ,
1260
1260
getString (R .string .copied_successfully ) + " to " + path ,
1261
- ( bottomBar .getHeight () * 2 ) - 22 );
1261
+ parentView .getHeight () - bottomBar . getTop () );
1262
1262
}
1263
1263
}
1264
1264
});
@@ -1497,7 +1497,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
1497
1497
SnackBarHandler .showWithBottomMargin (
1498
1498
parentView ,
1499
1499
getString (R .string .rename_no_change ),
1500
- ( bottomBar .getHeight () * 2 ) - 22 );
1500
+ parentView .getHeight () - bottomBar . getTop () );
1501
1501
renameDialog .dismiss ();
1502
1502
} else {
1503
1503
int index = file .getPath ().lastIndexOf ("/" );
@@ -1669,7 +1669,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
1669
1669
SnackBarHandler .showWithBottomMargin (
1670
1670
parentView ,
1671
1671
getResources ().getString (R .string .add_favourite ),
1672
- bottomBar .getHeight ());
1672
+ parentView .getHeight () - bottomBar . getTop ());
1673
1673
snackbar .setAction (
1674
1674
R .string .openfav ,
1675
1675
new View .OnClickListener () {
@@ -1755,7 +1755,7 @@ public void folderSelected(String path) {
1755
1755
SnackBarHandler .showWithBottomMargin (
1756
1756
relativeLayout ,
1757
1757
getString (R .string .photo_moved_successfully ) + " to " + path ,
1758
- ( bottomBar .getHeight () * 2 ) - 22 );
1758
+ parentView .getHeight () - bottomBar . getTop () );
1759
1759
}
1760
1760
});
1761
1761
bottomSheetDialogFragment .show (
@@ -1769,14 +1769,18 @@ public void folderSelected(String path) {
1769
1769
AlbumSettings .getSettings (getApplicationContext (), getAlbum ());
1770
1770
albumSettings .changeCoverPath (getApplicationContext (), getAlbum ().getMedia (0 ).getPath ());
1771
1771
SnackBarHandler .showWithBottomMargin (
1772
- parentView , getString (R .string .cover_removed ), (bottomBar .getHeight () * 2 ) - 22 );
1772
+ parentView ,
1773
+ getString (R .string .cover_removed ),
1774
+ parentView .getHeight () - bottomBar .getTop ());
1773
1775
} else {
1774
1776
AlbumSettings albumSettings =
1775
1777
AlbumSettings .getSettings (getApplicationContext (), getAlbum ());
1776
1778
albumSettings .changeCoverPath (
1777
1779
getApplicationContext (), getAlbum ().getCurrentMedia ().getPath ());
1778
1780
SnackBarHandler .showWithBottomMargin (
1779
- parentView , getString (R .string .change_cover ), bottomBar .getHeight ());
1781
+ parentView ,
1782
+ getString (R .string .change_cover ),
1783
+ parentView .getHeight () - bottomBar .getTop ());
1780
1784
MenuItem cover = menu .findItem (R .id .action_cover );
1781
1785
cover .setTitle ("Remove cover image" );
1782
1786
}
@@ -1936,15 +1940,15 @@ public void onClick(View v) {
1936
1940
SnackBarHandler .showWithBottomMargin (
1937
1941
parentView ,
1938
1942
getString (R .string .description_saved ),
1939
- (bottomBar .getHeight () * 2 ) - 22 );
1943
+ (parentView .getHeight () - bottomBar . getTop ()) );
1940
1944
} else {
1941
1945
databaseHelper .update (
1942
1946
new ImageDescModel (
1943
1947
pathForDescription , editTextDescription .getText ().toString ()));
1944
1948
SnackBarHandler .showWithBottomMargin (
1945
1949
parentView ,
1946
1950
getString (R .string .description_updated ),
1947
- ( bottomBar .getHeight () * 2 ) - 22 );
1951
+ parentView .getHeight () - bottomBar . getTop () );
1948
1952
}
1949
1953
}
1950
1954
});
@@ -1963,7 +1967,7 @@ public void onClick(View v) {
1963
1967
SnackBarHandler .showWithBottomMargin (
1964
1968
parentView ,
1965
1969
getString (R .string .description_deleted ),
1966
- (bottomBar .getHeight () * 2 ) - 22 );
1970
+ (parentView .getHeight () - bottomBar . getTop ()) );
1967
1971
}
1968
1972
}
1969
1973
});
0 commit comments