B4A Library [Lib] BetterDialogs

welu1805

Active Member
Licensed User
Longtime User
You are right: FileDialog is also a modal dialog. It seems to be right, that from one modal dialog not could be opened another modal dialog.

There is another library for dialogs: XtraViews. From XtraViews it is possible to call FileDialog because XtraViews are NOT real modal dialogs. But XtraViews don't work on all devices. I have a tablet LenovoPad YOGA Tablet 2-1050F with Android 5.0.1 where EVERY attempt to start a XtraViews dialog creates an error: InputChannel is not opened.

So I need to build my own pseudo modal dialog, from which I can call modal dialogs like FileDialog.
 

Lee Ogley

Member
Licensed User
Just getting my head around both B4A and also BetterDialogs.

I have a simple dialog that prompts the user of a code, and pops up the virtual numeric keyboard. When the use starts to enter a code, after pressing 1 key the size of the buttons on the dialog change, not by much, but it's bugging me. Any help would be appreciated.

The code I'm using is is below. I've also added screenshots of the button size changes.

B4X:
                    BetterDialogue.Initialize
                    BetterDialogue.InputType = BetterDialogue.INPUT_TYPE_NUMBERS
                    inputCode.InputBox("Please enter Cancel Code", BetterDialogue, "OK", "Cancel", "",Null)
                    sInputCode = BetterDialogue.Answer
 

Attachments

  • Before.jpg
    28.4 KB · Views: 324
  • After.jpg
    29.6 KB · Views: 317

Informatix

Expert
Licensed User
Longtime User
I'm unable to reproduce your case. It seems that you use an old version of Android. What's this version?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Manifest editor. The default code should be:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
  android:normalScreens="true"
  android:smallScreens="true"
  android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
 

Lee Ogley

Member
Licensed User
AddManifestText(
<uses-sdk android:minSdkVersion="3" />
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:windowSoftInputMode="stateHidden|adjustPan"
android:anyDensity="true"/>)
 

Lee Ogley

Member
Licensed User
It's the old G1, we are in the process of upgrading all engineers to the G4 Play, but not tested it on a Play yet.
 

Stern0m1

Member
Licensed User
trying to compile after I setup this library and im getting "Cannot find: C:\Program Files (x86)\Anywhere Software\Basic4android\libraries\maskededittext.jar"

I did not put this library over there I put it in the additional library's path.
 

jimmyF

Active Member
Licensed User
Longtime User
HI,
I am using appCompat toolbar with the following settings in the manifest (which I would rather not change):
B4X:
<item name="android:textColorPrimary">#fff</item>
        <item name="android:colorBackground">#0098FF</item>

My code is as follow:
B4X:
Dim IP As BD_InputBoxParams

IP.Initialize
                    'IP.Question = "<I>Your name ? </I>"
                    IP.Question = "<B><I>New Tag Name ? </I></B>"
                    IP.QuestionTextSize = 18
                    IP.SpaceBetween = 4dip
                    IP.InputTextSize = 24
                   
                    'IP.InputType = IP.INPUT_TYPE_TEXT_WITH_CAPS
                    IP.InputType = IP.INPUT_TYPE_TEXT
                    IP.Gravity = Gravity.CENTER_VERTICAL + Gravity.CENTER_HORIZONTAL
                    IP.ValidationCallback = "Input_Validation"
                    IP.WithSuggestions = True
                   
                    SelectedTagID= lstTags.CheckedList.Get(0)
                    IP.Default=edtNote.Text

Because my theme specifies white text in its menus, the default text above is white on a white background.
I tried this:

B4X:
      IP.Default="<Font Color=#000000>" & edtNote.Text & "</Font>"
But it just shows the full string in white text.
Is there a trick to getting black text? I really wou;d not like to change my popupmenu text colour from white.

Thanks for a great product.
 

jimmyF

Active Member
Licensed User
Longtime User
False alarm. I just discovered that I can have more than one <Style> in the manifest file.
Wow! Something new every day.
 

Inman

Well-Known Member
Licensed User
Longtime User
Since there is support for HTML tags, I was wondering if it is possible to display lists (ordered or unordered). Like with this code
HTML:
<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>
to display
  • Coffee
  • Tea
  • Milk
I am trying to display a changelog msgbox after each update, so some form of listing will be helpful. Thanks.
 

Informatix

Expert
Licensed User
Longtime User
Try and you'll know. HTML is not handled by my code so if that doesn't work, I won't be able to add the missing tag support.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…