afollestad MaterialDialogs reborn

No, sorry... Been busy
 
Another problem :-(

itemsCallbackMultichoice has the following definition:

Code: Copy
itemsCallbackMultichoice(selectedIndices() as Integer) as MaterialDialog

However, when I do this:

Code: Copy
dialog.itemsCallbackMultiChoice(Array As Int(1,2))

the program doesn't compile (Cannot cast type Int to Integer - how the hell do you do this in B4A?)

I've tried with

Code: Copy
dialog.itemsCallbackMultiChoice(Array As Object(1,2))

as well but this results in a java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.Integer[]
 
When using the progress dialog, I get
Code: Copy
java.lang.NoClassDefFoundError: Failed resolution of: Lme/zhanghai/android/materialprogressbar/IndeterminateProgressDrawable;
 
Thanks for taking a look at this library, it needs some TLC :-)

The code that crashes is:
Code: Copy
Dim pd1 As MaterialDialog
pd1.Initialize("")
pd1.title("Getting file list")
pd1.progressIndeterminateStyle(False)
pd1.progress(True,0)
pd1.show

By the way, there is a show for the progress dialog, but no hide?
 
Thanks for your efforts, but still some problems.

Messagebox and Inputbox seem to work ok.

Checkboxes are not:

Code: Copy
dialog.Initialize("sd1")
dialog.items(Array As String("Apple ", "Orange", "Grapes","Pineapple","Mango" ))
dialog.itemsCallbackMultiChoice(Array As Int(1,2))
[code]

crashes with:

[code]android.view.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class <unknown>

Also, is it correct that #AdditionalJar: com.android.support:recyclerview-v7 is no longer needed? The library works fine as well without #AdditionalRes: ..\res.commons and #AdditionalRes: ..\res.MaterialProgressBar
 
What is the signature for the onSelection function call? I now have this:
Code: Copy
Sub mcd1_onSelection(selected() As Int, strings() As string)
But this crashes with:
Code: Copy
java.lang.Exception: Sub mcd1_onselection signature does not match expected signature.
 
already got the single and multiselect working
they are working (does not crash) but the callbacks are not called :-(
damned library... I´m loosing the mood on it

edit: the issue was a missing parameter in the builder.
if you dont call alwaysCallMultiChoiceCallback then you only get a event when pressing a button.

But now it works....

** Activity (main) Resume **
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
itemsCallbackMultiChoice
lib: NOTFOUND 'dialog_onshow
onSelection
lib:Raising.. dialog_onselection()
Dialog_onSelection([I@296caf6,[Ljava.lang.String;@c4f8ef7)
Selected: 0 -> Hallo
Selected: 1 -> B4X
Selected: 2 -> World!
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
onSelection
lib:Raising.. dialog_onselection()
Dialog_onSelection([I@e1fa8df,[Ljava.lang.String;@469092c)
Selected: 1 -> B4X
Selected: 2 -> World!
onSelection
lib:Raising.. dialog_onselection()
Dialog_onSelection([I@e5eb3f4,[Ljava.lang.String;@bdf271d)
Selected: 1 -> B4X
onSelection
lib:Raising.. dialog_onselection()
Dialog_onSelection([I@e4071bc,[Ljava.lang.String;@77fe545)
onSelection
lib:Raising.. dialog_onselection()
Dialog_onSelection([I@e3e90c1,[Ljava.lang.String;@704a066)
Selected: 2 -> World!
onSelection
lib:Raising.. dialog_onselection()
Dialog_onSelection([I@faa5cf2,[Ljava.lang.String;@9077f43)
Selected: 0 -> Hallo
Selected: 2 -> World!
onSelection
lib:Raising.. dialog_onselection()
Dialog_onSelection([I@d98cc9f,[Ljava.lang.String;@a61c1ec)
Selected: 0 -> Hallo
Selected: 1 -> B4X
Selected: 2 -> World!

Edit: Lib in post #1 updated to V1.12
 
Last edited:
With 1.12 the message boxes don't show up on the screen. No alerts, no input boxes, no wait window... nothing!
 
All my apps stopped showing the alerts with 1.12 and the demo code on Page 1 isn't working either.
 
I have discovered why the lib was not working anymore since 1.12. A "build" command is now necessary before a "show" command. That was not the case before.
 
Back
Top