Android Question How to Show Dialog at Center of Screen

Sanjog

New Member
I am using Appcompact (AHToolBarLight1) for Toolbar, B4xPreferenceDialog for settings but while the dialogbox popup it shows at the top of the screen. How can I set the dialog at center of the screen? I have tried setting putattop=false but didn't work.

preference dialog:
    prefdialog.Initialize(Activity,"Settings",300dip,200dip)
    prefdialog.LoadFromJson(File.ReadString(File.DirAssets,"preferencedialog.json"))
    prefdialog.SetEventsListener(Me,"PrefDialog")
    prefdialog.Dialog.TitleBarColor = Colors.RGB(63,81,181)
    prefdialog.Dialog.PutAtTop = False
 

Attachments

  • pref.jpg
    pref.jpg
    390.2 KB · Views: 148
Top