Android Question [Solved] how to give full size of panel to preference dialog ?

AnandGupta

Expert
Licensed User
Longtime User
I want to give preference-dialog to use full size of panel, so I use
B4X:
pref.Initialize(pnlBase, "title", pnlBase.Width, pnlBase.Height)

but the 'save' 'cancel buttons do not show, the I use
B4X:
pref.Initialize(pnlBase, "title", pnlBase.Width, pnlBase.Height-60dip)

then it shows.


is this correct way ?
how to give full size of panel to preference-dialog ?
 
Solution
1. Remember that you need to leave place for the keyboard (if there are text fields).
2. There is an internal Dialog field that you can access and get or set the buttons bar height. Your solution with pnlBase.Height - 60dip looks good.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…