I am creating an activity that is styled like a dialog. The code works great, but the dialog looks different on my Galaxy S3 than my Nexus 5. How do make sure that all resolutions will show the button?
Code:
requestWindowFeature(Window.FEATURE_LEFT_ICON);
setContentView(R.layout.widget_dialog);
setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.icon);
//Setup Dialog Activity Parameters
this.setFinishOnTouchOutside(false);
setContentView(R.layout.widget_dialog);
LayoutParams params = getWindow().getAttributes();
params.x = -30;
params.height = 350;
params.width = 550;
params.y = -30;
getWindow().setAttributes(params);
Screenshot on my Samsung Galaxy S3
Screenshot on my Nexus 5
Notice that the button is missing.