B4A Library Alerter Library

Patrick Clark

Active Member
Licensed User
this is excellent but...

What does dismissable do? If I set it to TRUE it doesn't seem to make any difference.
 

Pendrush

Well-Known Member
Licensed User
Longtime User
If you set it to False, user will not be able to dismiss dialog by touching on it.
 

Patrick Clark

Active Member
Licensed User
Thanks.

I have added Alerter1.Dismissable(True) and Alerter1.Dismissable(False) to the btnShowAlertWithIcon_Click and to btnShowAlertWithOneButton_Click and it makes no difference. In all cases tapping on the alert closes it
 

Patrick Clark

Active Member
Licensed User
but if i change dismissable to true in that example it makes no difference. the alert still doesn't dismiss when tapped
 

Pendrush

Well-Known Member
Licensed User
Longtime User
You can use:
B4X:
Sub Alerter1_Click
    Alerter1.Close
End Sub
Indeed dismissable(False) or True does not change behavior.
 

Patrick Clark

Active Member
Licensed User
Ok, thanks. I am glad I am not going mad

one final question. is it possible to get the index of the button rather than the text?
 

Almora

Active Member
Licensed User
Longtime User
hi..
android 13
I get this error..
is there a solution for this..
android.view.InflateException: Binary XML file line #49 in xx:layout/alerter_alert_default_layout: Binary XML file line #49 in xx:layout/alerter_alert_default_layout: Error inflating class androidx.appcompat.widget.AppCompatTextView

#AdditionalJar: androidx.appcompat:appcompat
 

NGUYEN TUAN ANH

Active Member
Licensed User
How to Use v1.02 with android:targetSdkVersion="31" ?
Because v1.10 hide my title bar, i want to keep title bar, could you please help me
 
Last edited:

Pendrush

Well-Known Member
Licensed User
Longtime User
How to Use v1.02 with android:targetSdkVersion="31" ?
Because v1.10 hide my title bar, i want to keep title bar, could you please help me

Remove this from manifest:
B4X:
SetApplicationAttribute(android:theme, "@style/Theme.AppCompat")

Add this:
B4X:
SetApplicationAttribute(android:theme, "@style/myTheme")
CreateResource(values-v21, theme.xml,
<resources>
  <style name="myTheme" parent="@style/Theme.AppCompat">
        <item name="android:windowNoTitle">false</item>
        <item name="android:windowActionBar">true</item>
    </style>
</resources>)

Another example with title bar attached to post #1
 
Last edited:

syerif

Active Member
Licensed User
Longtime User
hi ,
i got this error

Error in D:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.7.22-63817667628000\dex_v1\kotlin-stdlib-1.7.22.zip:classes.dex:
Type kotlin.ArrayIntrinsicsKt is defined multiple times: D:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.7.22-63817667628000\dex_v1\kotlin-stdlib-1.7.22.zip:classes.dex, D:\Android\tools\..\extras\b4a_local\unpacked-kotlin-stdlib-1.6.10-63810050730000\dex_v1\kotlin-stdlib-1.6.10.zip:classes.dex
Compilation failed

any solution please?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…