Android Question B4XPreferencesDialog initial values

Discussion in 'Android Questions' started by HAH, Jun 20, 2019.

  1. HAH

    HAH Active Member Licensed User

    This code I creating item programmatically:
    How to programmatically initialize a default value?
    How to programmatically set it as mandatory or optional field?

    Thank you
  2. Erel

    Erel Administrator Staff Member Licensed User

    Default values are always set programmatically.
    Read the tutorial:
    It is explained. It is also shown in the example.

    Why are you creating the template programmatically? You can get the items from PrefItems list and modify them.
  3. HAH

    HAH Active Member Licensed User

    Yes, I got it, I should call createmap and assign it to option before prefdialog.ShowDialog
    And to set any field mandatory It is better to call LoadFromJson, it is simpler and quick

    Thank you @Erel
    Erel likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice