From fc755e517634b3d7cfbc4a125817203493338011 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 1 Oct 2014 11:50:19 -0700 Subject: Call setView after dialog is created to work around issue with top/bottom borders http://stackoverflow.com/a/10556843/992439 --- .../daneren2005/dsub/fragments/SelectDirectoryFragment.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/github') 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(); } }); -- cgit v1.2.3