In my app I have a button which when cancelled should display a dialog which contains only an image and nothing else. The image is retrieved from a URL. But when button is clicked nothing is displayed.
My code
public void onClick(View v){
final Dialog dialog = new Dialog(SingleItemView.this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
ImageView imgvw = new ImageView(SingleItemView.this);
String imgurl =descImgOne;
Uri imguri = Uri.parse(imgurl);
imgvw.setImageURI(imguri);
dialog.getWindow().getAttributes().windowAnimations = R.style.SmileWindow;
dialog.addContentView(imgvw, new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
dialog.show();
}
Where descImgOne is assigned a URL link