Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dialog dialog = new Dialog(this);
- dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
- WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
- Window window = dialog.getWindow();
- lp.copyFrom(window.getAttributes());
- //This makes the dialog take up the full width
- lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
- lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
- window.setAttributes(lp);
- dialog.setContentView(R.layout.custom_dialog);
- Button btnPositive=(Button) dialog.findViewById(R.id.btnPositive);
- Button btnNegative=(Button) dialog.findViewById(R.id.btnNegative);
- Button btnNeutral=(Button) dialog.findViewById(R.id.btnNeutral);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement