Using preference screen like a dialog

cheese

Member
Licensed User
Longtime User
Is it possible to use the preferences screen like a dialog?

I think to do this I would have to settle for persisting the dialog's choices and settling for that, right? Also I assume I'd have to capture the user input in Activity_Resume? This is cloudy for me how I would do that. How do I know the preference activity even ran?


I am currently using a custom dialog but I find it a pain to place widgets on a panel programmatically. I wish there were some layout grid bag or auto-positioning in b4a or Android. Is there something I can use?

All the best
Geoff
 

warwound

Expert
Licensed User
Longtime User
I just tried this and it works, updating the manifest file entry for the PreferenceActivity to:

B4X:
AddApplicationText(
<activity android:name="anywheresoftware.b4a.objects.preferenceactivity" android:theme="@android:style/Theme.Dialog" />)

Is that what you wanted to do?

Martin.
 
Upvote 0

joneden

Active Member
Licensed User
Longtime User
Hi Geoff,

Nice idea - I'm also using a custom dialog and running into issues with it - I wish I had time to write a customdialog form builder tool!

Could you post if you get anywhere with this idea?

Cheers,

Jon
 
Upvote 0

cheese

Member
Licensed User
Longtime User
thanks for your replies!

I don't have the time for custom dialog builder though it is nice to have. I wonder if we can use the new Java interface builder somehow to accomplish that... which is a different thread.

Cheesr
 
Upvote 0
Top