Android Question DesignSupport - snackbar events

jtare

Active Member
Licensed User
Longtime User
This adds a Dismissed event to the snackbar
Which is the name of the dismiss event? For the DesignSupport - snackbar.
I tried with:
B4X:
Sub snack_Dismissed
End Sub
But I get this error
B4X:
main_button4_click (java line: 395)
java.lang.NoSuchMethodError: No virtual method addCallback(Landroid/support/design/widget/BaseTransientBottomBar$BaseCallback;)Landroid/support/design/widget/BaseTransientBottomBar; in class Landroid/support/design/widget/Snackbar; or its super classes (declaration of 'android.support.design.widget.Snackbar' appears in /data/app/de.amberhome.designsupport.snackbar-2/base.apk)
    at de.amberhome.objects.SnackbarWrapper.Initialize(SnackbarWrapper.java:108)
    at de.amberhome.designsupport.snackbar.main._button4_click(main.java:395)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:6261)
    at android.widget.TextView.performClick(TextView.java:11185)
    at android.view.View$PerformClick.run(View.java:23752)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6776)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
main_button4_click (java line: 395)
java.lang.NoSuchMethodError: No virtual method addCallback(Landroid/support/design/widget/BaseTransientBottomBar$BaseCallback;)Landroid/support/design/widget/BaseTransientBottomBar; in class Landroid/support/design/widget/Snackbar; or its super classes (declaration of 'android.support.design.widget.Snackbar' appears in /data/app/de.amberhome.designsupport.snackbar-2/base.apk)
    at de.amberhome.objects.SnackbarWrapper.Initialize(SnackbarWrapper.java:108)
    at de.amberhome.designsupport.snackbar.main._button4_click(main.java:395)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
    at android.view.View.performClick(View.java:6261)
    at android.widget.TextView.performClick(TextView.java:11185)
    at android.view.View$PerformClick.run(View.java:23752)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6776)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
** Activity (main) Resume **
I updated all the libraries.
I there an onShow event also?

EDIT:
B4X:
Sub snack_Dismissed(event as int)
End Sub
 
Last edited:

jtare

Active Member
Licensed User
Longtime User
The last libraries ver, I just downloaded them all agian today.
You are using which version of the Google Repository?
Now that you mention that I realize that I haven't updated it in a very long time. Im using ver 32, last one is 58.

Thanks, I'll update and try again.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…