I need to display a certain view when an activity starts, and when the user click ckecked
to dismiss the view. It look like this
:
Has anyone an idea how can I do this? Any idea is welcome.
Yes, you can use a custom dialog
just create a custom XML and inflate it into your dialog object
Dialog dialog = new Dialog(mContext);
dialog.setContentView(R.layout.custom_dialog);
dialog.show();
and then dismiss it by calling dialog.dismiss();
create custom dialog using below link and open it when activity starts...
you need to increase the margin to proivde more spaces
Have a look at custom dialog examples -
yes, you can use PopupWindow for Creating window
see these tutorila for adding PopupWindow in your Activity:
You could use a RelativeLayout
for this. When the user clicks check
, the visibility
of the 'upper' layout must be set to GONE
.