Android Question [SD_IconTextView] [SOLVED] How to?

Mashiane

Expert
Licensed User
Longtime User
Ola

Just started using the SD_IconTextView, awesome library, thanks @Star-Dust . A few questions.

1. I have set enter press event and also "Single Line", however when I press Enter, it first moves to the next line of the textfield before it execute the request focus of the other text field I have coded. I have set wrap = false and single line = true on the native object. How can I solve this?
2. The overall background color of the textfield is "white". I need this to blend with the layout background which is light greyish, how do I achieve this?


Thanks.
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
Download version 0.12. I added the HintClick event.
Thanks a million, for the other text boxes you did that are able to have icons on either side, can you please add the RightHintClick events perhaps. I need to use those and will have an i icon, that one can click for tooltips.

This is perfect, I appreciate your help.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Thanks a million, for the other text boxes you did that are able to have icons on either side, can you please add the RightHintClick events perhaps. I need to use those and will have an i icon, that one can click for tooltips.

This is perfect, I appreciate your help.
The right one already raises the EnterPressed event
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
The right one already raises the EnterPressed event
Yes, I think I have noted that... This is the one I'm referring to for the RightHintClick event.

1611138923939.png


At the moment with this one this is how I am using the EnterPressed event, to move the focus to the next SD text box. I had assumed that, such is for when a user types something and then presses the enter key.

B4X:
Private Sub txtMobile_EnterPressed
    txtNextOfKin.NativeObject.RequestFocus
End Sub

So the assumption is, I can click the hint on either side and it can do different things.

Thanks
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Sorry, you're right. EnterPressed is lifted from the EnterKey keyboard.
While The Send Button raises two events: Click and unFocus

The enterKey button does not raise the Click
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
SD_IconTextView1.HintFont=xui.CreateDefaultFont(size)
Perfect, thank you..

B4X:
txtFirstName.HintFont = xui.CreateFontAwesome(20)
    txtLastName.HintFont = xui.CreateFontAwesome(20)
    txtMobile.HintFont = xui.CreateFontAwesome(30)
    txtNextOfKin.HintFont = xui.CreateFontAwesome(20)
    txtDeviceID.HintFont = xui.CreateFontAwesome(20)
    
    txtFirstName.Hint = Chr(0xF2C0)
    txtLastName.Hint = Chr(0xF2BE)
    txtMobile.hint = Chr(0xF10B)
    txtNextOfKin.Hint = Chr(0xF2A0)
    txtDeviceID.Hint = Chr(0xF1EB)
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
I wanted to apply SetLayoutAnimation to this component and just change the top. Here we go...

B4X:
Sub AnimateSDIconTextView(t As SD_IconTextView, Duration As Int, newTop As Int)
    Dim base As B4XView = t.GetBase
    Dim left As Int = base.Left
    Dim height As Int = base.Height
    Dim width As Int = base.width
    base.SetLayoutAnimated(Duration, left, newTop, width, height)
End Sub
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Hi, sorry for the seemingly pressure. Are you getting any luck with the TwoIconTextView?

Thanks
I've already answered you. Send button would be what you call right button
Sorry, you're right. EnterPressed is lifted from the EnterKey keyboard.
While The Send Button raises two events: Click and unFocus

The enterKey button does not raise the Click
 
Upvote 0
Top