Custom dialogs with designer?

U

unba1300

Guest
I'd like to make some custom dialogs, and it seems all the views must be defined and added to a panel with code and then the panel added to the custom dialog. Is this correct? I'd prefer to use the designer.
 
I've gone back to trying to do this with code, but don't understand how to position the views.

What does this mean in the Custom2Dialog Demo:

cd.AddView(pnl, 77%x, 60%y)

Is the panel being set to 77% of the activity's width, or 77% of the dialog's width?

And when I add views to the panel...

pnl.AddView(lblText, 0dip, 70dip, 220dip, 90dip)

again, are these numbers in relation to the activity or the dialog?
 
Upvote 0
Thank you. I was able to do this with the code:
Code: Copy
pnl.LoadLayout("layoutsettings")
cd.AddView(pnl, 100%x, 100%y)
But anything in the loaded layout that is anywhere near the top or bottom, and to a lesser degree, the sides, does not show up since the custom dialog is smaller than the activity, even at 100%x, 100%y. Should I just proceed with trail and error to get the views within the custom dialog? Thanks.
 
Upvote 0
Thanks guys. After some testing, I'm showing that a view that is 280 wide by 290 high just fits within the customdialog2 at 100%x, 100%y. This is in the emulator at 320 by 480 and using the customdialog2's title at the top and buttons at the bottom.
 
Upvote 0
Back
Top