B4A Library TagView V1.0.0

This is a wrap for this github project.

TagView
Version:
1
  • TagView
    Methods:
    • Initialize (tagtext As String)
    • IsInitialized As Boolean
    • isDeletable As Boolean
    Properties:
    • Background As Drawable
    • Deletable As Boolean [write only]
    • DeleteIcon As String
    • DeleteIndicatorColor As Int
    • DeleteIndicatorSize As Float
    • Id As Int
    • LayoutBorderColor As Int
    • LayoutBorderSize As Float
    • LayoutColor As Int
    • LayoutColorPress As Int
    • Radius As Float
    • Text As String
    • TextColor As Int
    • TextSize As Float
  • TagViewGroup
    Events:
    • onTagClick (tag As TagView, position As Int)
    • onTagDeleted (tag As TagView, position As Int)
    Fields:
    • ba As BA
    Methods:
    • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • addTag (tag As Tag)

      tag:
    • addTags (tags As ArrayList)
    • addTags2 (tags() As String)
    • remove (position As Int)
      remove tag
      position:
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • LineMargin As Int
    • Tag As Object
    • TagMargin As Int
    • Tags As List [read only]
      get tag list
    • TexPaddingBottom As Int [read only]
    • TextPaddingBottom As Float [write only]
    • TextPaddingLeft As Int
    • TextPaddingRight As Int
    • TextPaddingTop As Int
    • Top As Int
    • Visible As Boolean
    • Width As Int


If you want to donate for my work building the class you can do it here:
 

Attachments

Last edited:
@DonManfred I want to use some tags in my new app, I'm thinking about to do it with button/panel... but it seems not flexible enough and then BOOM! You made this lib, just like you can read my mind :D
Ok, I will use your 2 libs in my new app and I'm sure will donate to you. Thank you so much.
 
Is there a way to calculate the right height of TagGroup? I have many TagView. If I add all TagView to a TagGroup, it only shows about half of TagView. I want to put TagGroup into a ScrollView but I need its height to adjust the ScrollView panel to fit TagGroup height.
 
Hmm interesting, very useful indeed...
 
Can I use custom font for text? Maybe change something in .xml attribute file?
 
My Device IS running Lollipop. My device is the device in the Video.

I will test it again. But in a Samsung Core Prime it isn't showing tags.

I will test out of my app. May be my error, but test the same file in my two phones and un a Galaxy S5 Mini with 4.4 its working well.

Thanks
 
I tried with your example, and it works well.

But in my app, doesn't work in lollipop (ViewTagger library). I am investigating it, but no error is shown and no tags.

I don't know where I can start to debug this error. :-(


i´ll test the lib on my lollipo device later today
 
I tried with your example, and it works well.

But in my app, doesn't work in lollipop
please upload your project (file export as zip) and i´ll have a look.

NOTE that you should upload your project to the correct lbrar<y-thread to let me know which lib exctly you are using...
 
I confirm it worked great on my Lollipop phone.
 
Hi
Thanks for this beautiful library.

i have error when i click on any tags!!!

Code: Copy
lib:Raising.. tagview_ontagdeleted()
seif.dialer.business_form_1:_tagview_ontagdeleted, [class com.github.tagview.Tag.Tag, 3]
Error occurred on line: 446 (Business_Form_1)
java.lang.IllegalArgumentException: method seif.dialer.business_form_1._tagview_ontagdeleted argument 1 has type de.donmanfred.TagWrapper, got java.lang.Class<com.github.tagview.Tag.Tag>
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA$2.run(BA.java:387)
    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:6153)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
** Activity (business_form_1) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**


Code: Copy
lib:Raising.. tagview_ontagdeleted()
java.lang.Exception: Sub tagview_ontagdeleted signature does not match expected signature.
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:215)
    at anywheresoftware.b4a.BA$2.run(BA.java:387)
    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:6153)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
--------- beginning of crash


:confused::confused: what is problem & how can i solve it
 
Back
Top