2

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

: enter image description here

Has anyone an idea how can I do this? Any idea is welcome.

4

4 に答える 4

4

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();

于 2012-06-21T07:53:20.470 に答える
2

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 -

custom dialog 1

custom dialog 2

于 2012-06-21T07:56:13.020 に答える
1

yes, you can use PopupWindow for Creating window

see these tutorila for adding PopupWindow in your Activity:

Using the PopupWindow class in Android apps

Example of using PopupWindow

于 2012-06-21T07:56:35.443 に答える
0

You could use a RelativeLayout for this. When the user clicks check, the visibility of the 'upper' layout must be set to GONE.

于 2012-06-21T08:00:08.163 に答える