Wish LabelExtras Library

nw11

Member
Licensed User
Hi all,

Is there any way i can use LabelExtras Library features in B4J

In B4A i use this library to show emoticon in a Edittext View with this commands

B4X:
Str = html1.CharSequenceFromEditTextToHtml(EditText1)
       
        matcher1 = Regex.Matcher("<(?!br|img)[^>]+>",Str)
       
        Do While matcher1.Find
            Str = Str.Replace(matcher1.Match,"")
        Loop
           
        sp.Append(html1.FromHtml2(Str & "<img src='001.png' />","ImageGetter",""))   

        EditText1.Text = sp
B4X:
Sub ImageGetter_GetDrawable(Source As String) As Object
    If File.Exists(File.DirAssets, Source) Then
        Dim Bitmap1 As Bitmap
        Bitmap1=LoadBitmap(File.DirAssets, Source)
        Bitmap1=ResizeBitmap(Bitmap1, 24dip, 24dip)
       
        Dim BitmapDrawable1 As BitmapDrawable
        BitmapDrawable1.Initialize(Bitmap1)

        LabelExtras1.SetDrawableBounds(BitmapDrawable1, 0, 0, Bitmap1.Width, Bitmap1.Height)

        Return BitmapDrawable1
    Else
        '    the default placeholder image will be used if Null is returned by this Sub
        Return Null
    End If
End Sub

.. in order to convert my App in B4J i need to do the same things in B4J

anyone can help me.
 

tdocs2

Well-Known Member
Licensed User
Thank you, Erel.

Where would I find the ability to consume a click on a label on a listview in B4J?

Looks for a similar JavaFx solution.
I would not know where to start...

Best regards.

Sandy

PS: It seems that B4J is increasing in popularity since Open Designer was added - lots simpler than FXML... Couple that with Derez Menu Designer (just shy of industrial strength) and that is RADDDDDDDDDDDDDDDDDDDDD!:cool::cool::cool:
 

LucaMs

Expert
Licensed User
Thank you, Erel.

Where would I find the ability to consume a click on a label on a listview in B4J?



I would not know where to start...

Best regards.

Sandy

PS: It seems that B4J is increasing in popularity since Open Designer was added - lots simpler than FXML... Couple that with Derez Menu Designer (just shy of industrial strength) and that is RADDDDDDDDDDDDDDDDDDDDD!:cool::cool::cool:

For all I know, you have the events of the listview, not the label, and this also in B4A.
But this answer is probably "completely incorrect".

[I noticed now that this is not the place for questions]
 
Top