B4A Library [B4X] [XUI] [B4XLib] SD TextView

I needed to develop a modern editText (or TextField), but different from the B4XFloatTextField, different in terms of graphics and style. So I created the SD_TextView
(see also xComboBox)

NOTE: You can use this library for personal and commercial use. Include it in your projects.. Attention, even if it is a B4XLib library, it is not allowed to decompress it, modify it, change its name or redistribute it without the permission of the author

SD_TextView

Author:
Star-Dust
Version: 0.22
  • SD_IconTextView
    • Events:
      • EnterPressed
      • FocusChanged (HasFocus As Boolean)
      • HintClick
      • TextChanged (OldText As String, Newtext As String)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • GetBase As B4XView
      • Initialize (Callback As Object, EventName As String)
    • Properties:
      • Hint As String
      • HintFont As B4XFont
      • NativeObject As TextField [read only]
      • Text As String
      • TextFont As B4XFont
  • SD_TextView
    • Events:
      • EnterPressed
      • FocusChanged (HasFocus As Boolean)
      • TextChanged (OldText As String, Newtext As String)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • GetBase As B4XView
      • Initialize (Callback As Object, EventName As String)
      • SetHintColor (HintTextColor As Int, HintBackGroundColor As Int)
      • SetTextViewColor (TextColor As Int, BackGroundColor As Int, Corner_Color As Int)
    • Properties:
      • AnimateHint As Boolean
      • Hint As String
      • HintFont As B4XFont
      • NativeObject As TextField [read only]
      • Text As String
      • TextFont As B4XFont
  • SD_TwoIconTextView
    • Events:
      • Click
      • EnterPressed
      • FocusChanged (HasFocus As Boolean)
      • HintClick
      • TextChanged (OldText As String, Newtext As String)
      • Unfocus
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • GetBase As B4XView
      • Initialize (Callback As Object, EventName As String)
    • Properties:
      • Hint As String
      • HintFont As B4XFont
      • NativeObject As TextField [read only]
      • Text As String
      • TextConfirmButton As String
        Char fontAwesone
      • TextFont As B4XFont
  • SD_UnderLineTextView
    • Events:
      • EnterPressed
      • FocusChanged (HasFocus As Boolean)
      • TextChanged (OldText As String, Newtext As String)
    • Fields:
      • ExpansionTime As Int
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • GetBase As B4XView
      • Initialize (Callback As Object, EventName As String)
      • UnderLine (Show As Boolean)
    • Properties:
      • Hint As String
      • HintFont As B4XFont
      • NativeObject As TextField [read only]
      • Text As String
      • TextFont As B4XFont

1605734557938.png


1605734432742.png


Video.gif
Underline1.gif


1645032504598.png
1645129052006.png
 

Attachments

  • Sample B4i.zip
    110.6 KB · Views: 442
  • 1597673547592.png
    1597673547592.png
    20.7 KB · Views: 1,346
  • Sample B4J.zip
    2.5 KB · Views: 398
  • Sample B4A.zip
    8.3 KB · Views: 621
  • SD_TextView.B4xLib
    9.2 KB · Views: 116
Last edited:

Star-Dust

Expert
Licensed User
Update 0.2

Added IconTextField. A new view allows you to insert an icon (FontAversone or Material) before the editable text

1597416460639.png
 

omo

Active Member
Licensed User
Longtime User
Fontawesome icon is not responding to click event and does multiple icons on a single IconTextField allowed with '&' - concatenation sign?
 

Star-Dust

Expert
Licensed User
Fontawesome icon is not responding to click event
There is no event connected to the icon, because it is not a button. It is an icon / label that describes the type of information to be edited.

In the example we indicate username and in the following view the password
1597427379712.png


does multiple icons on a single IconTextField allowed with '&' - concatenation sign?
Yes, it is possible to do it. But keep in mind that the space is only 40dip. Therefore it is not possible to insert more than 2 characters if the font size is not reduced
 

Xfood

Expert
Licensed User
Ritengo che sia ottima, e molto bella questa lib, ma non capisco la differenza con quella di erel...
SD_TextView vs B4XFloatTextField
 

Star-Dust

Expert
Licensed User
Ritengo che sia ottima, e molto bella questa lib, ma non capisco la differenza con quella di erel...
SD_TextView vs B4XFloatTextField
Please write in English in the intentional forum

Only the graphics.The editable view is surrounded by a rounded border line. The label is placed on the top line. Also can the view can be colored like the frame so as to create a particular effect.
Additionally, the label animation is optional.

Otherwise all editable views are the same
 

Star-Dust

Expert
Licensed User

Star-Dust

Expert
Licensed User

Star-Dust

Expert
Licensed User
It is important for Arabic/Hebrow/Persian Languages because they are Right To Left (RTL) languages, their sentences written from right to left (english opposite)
Ok. When I can, I will try to implement it
 
Top