aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-10-01 11:50:19 -0700
committerScott Jackson <daneren2005@gmail.com>2014-10-01 11:50:19 -0700
commitfc755e517634b3d7cfbc4a125817203493338011 (patch)
tree336b009c7971e9b9491401bf9d9212e16a5dbdca
parentc790cff9edb53d0bed8bef8179af7b19ead58d19 (diff)
downloaddsub-fc755e517634b3d7cfbc4a125817203493338011.tar.gz
dsub-fc755e517634b3d7cfbc4a125817203493338011.tar.bz2
dsub-fc755e517634b3d7cfbc4a125817203493338011.zip
Call setView after dialog is created to work around issue with top/bottom borders
http://stackoverflow.com/a/10556843/992439
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index 824d4f33..5f988bbc 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -1187,12 +1187,14 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
return;
}
- AlertDialog.Builder imageDialog = new AlertDialog.Builder(context);
+ AlertDialog.Builder builder = new AlertDialog.Builder(context);
ImageView fullScreenView = new ImageView(context);
imageLoader.loadImage(fullScreenView, albumRep, true, true);
- imageDialog.setView(fullScreenView);
- imageDialog.setCancelable(true);
- imageDialog.create();
+ builder.setCancelable(true);
+
+ AlertDialog imageDialog = builder.create();
+ // Set view here with unecessary 0's to remove top/bottom border
+ imageDialog.setView(fullScreenView, 0, 0, 0, 0);
imageDialog.show();
}
});