B4A Library NotificationBadge - dont get confused with the android Notifications...

This is a wrap for this Github project.





NotificationBadge
Author:
DonManfred (wrapper)
Version: 1
NotificationBadge
Fields:

  • ba As anywheresoftware.b4a.BA
Methods:
  • DesignerCreateView (base As anywheresoftware.b4a.objects.PanelWrapper, lw As anywheresoftware.b4a.objects.LabelWrapper, props As anywheresoftware.b4a.objects.collections.Map) As void
  • show (text As java.lang.String) As void
  • IsInitialized As boolean
  • Initialize (ba As anywheresoftware.b4a.BA, EventName As java.lang.String) As void
  • BringToFront As void
  • SetLayout (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
  • SendToBack As void
  • SetVisibleAnimated (arg0 As int, arg1 As boolean) As void
  • RemoveView As void
  • Invalidate3 (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
  • clear As void
  • Invalidate2 (arg0 As android.graphics.Rect) As void
  • SetColorAnimated (arg0 As int, arg1 As int, arg2 As int) As void
  • SetBackgroundImage (arg0 As android.graphics.Bitmap) As void
  • Invalidate As void
  • SetLayoutAnimated (arg0 As int, arg1 As int, arg2 As int, arg3 As int, arg4 As int) As void
  • RequestFocus As boolean
Properties:
  • Left As int
  • Background As android.graphics.drawable.Drawable
  • AnimationEnabled As boolean
  • Parent As java.lang.Object [read only]
  • Color As int [write only]
  • TextSize As float [write only]
  • Enabled As boolean
  • Text As java.lang.String [write only]
  • BadgeBackgroundDrawable As android.graphics.drawable.Drawable [write only]
  • BadgeBackgroundResource As java.lang.String [write only]
  • MaxTextLength As int [write only]
  • Number As int [write only]
  • Top As int
  • Visible As boolean
  • Padding As int[]
  • Height As int
  • TextColor As int
  • Tag As java.lang.Object
  • Width As int
 

Attachments

  • NotificationBadgeV1.0.zip
    10 KB · Views: 479
  • res.NotificationBadge.zip
    2.5 KB · Views: 447
Last edited:

DonManfred

Expert
Licensed User
Longtime User
I wish i can do but i really dont know how to do it.
Open the designer, place the CUSTOMVIEW over a normal view.
in your app load the layout and then call objectname.Text = "25"

Maybe you should go over the beginners guide again.

It is decribed how to create a layout or how to add a customview to the layout.
 

ykucuk

Well-Known Member
Licensed User
Longtime User
Thank you.
 

MarcoRome

Expert
Licensed User
Longtime User
Hi Don i have this message:


Maybe you forget Resource ( android.content.res.Resources$NotFoundException: Resource ID #0x0 )
Thank you
 

MarcoRome

Expert
Licensed User
Longtime User
Hi Don the FontAwesome dont work.



As you see in movie #11 in Notification your right also if i insert Propery TypeFace FontAwesome this dont work.
Can you add this property ?
So will be fantastic and more that wrapper.
Thank anyway for this beatiful library
 

Zolivem

New Member
Licensed User
Longtime User
Hi,
I implemented this notifcation badge in an app (the badge is displayed on a menu button as the example you provided), it works well on few devices (samsung galaxy S4, samsung galaxy tab 2 for instance) but on few other devices (ex OnePlus One),the badge is displayed under the menu button. I tried to use BringToFront method but it didn't fix the problem (in this case, the badge disappeared).
Do you know from what the pb could comming from ?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…