B4A Library afollestad material-dialogs

lomosami

Member
Licensed User
Longtime User
Very beautiful library. I have a question. When a dialog appear it can be close tapping outside the dialog. Is it possible to prevent this feature? I would like close the dialog only when pressing button on the dialog and not outside it.
Thanks
 

tchart

Well-Known Member
Licensed User
Longtime User
Will this work for custom dialogs?

trueboss323, the actual library does support custom dialogs but the B4A wrapper does not implement this. I have not had much time to work on the library and also my B4A version is not up to date.
 

trueboss323

Active Member
Licensed User
Longtime User
I tried using your library as a test sample and I wanted to display a simple message box. But I keep getting a android.content.res.Resources$NotFoundException: Resource ID #0x0 error. And my code looks like this:
B4X:
Dim MD As MD_BasicDialog
    MD.Initialize("MD")
    MD.Show("Test","test","ok","ok","",Null ,False,False)

So what is the correct way to use it?
 

tchart

Well-Known Member
Licensed User
Longtime User

Have you included the additional resources?

B4X:
    #AdditionalRes: D:\Apps\B4A\AdditionalRes\afollestad_material-dialogs\core\res, com.afollestad.materialdialogs
    #AdditionalRes: D:\Apps\B4A\AdditionalRes\afollestad_material-dialogs\commons\res, com.afollestad.materialdialogs
    #AdditionalRes: D:\Apps\B4A\AdditionalRes\me.zhanghai.android.materialprogressbar\res, me.zhanghai.android.materialprogressbar   
    #AdditionalRes: D:\Apps\Android\android-sdk\extras\android\support\v7\appcompat\res, android.support.v7.appcompat   
    #Extends: android.support.v7.app.AppCompatActivity
 

trueboss323

Active Member
Licensed User
Longtime User
One thing, I'd like to use this library on older Android versions. And on Android versions 5+ it should let it use the native material dialog, is it possible?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…