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
.. in order to convert my App in B4J i need to do the same things in B4J
anyone can help me.
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.