may also add) DONE, GO, NEXT, PREVIOUS, SEARCH, SEND
@gordonlu310 I like this extension, I suggest you add a function like this too
"set edittext underline color" if you can
Bruh, you need to add a Textbox
Component in the parameter of every method for this to work.
No Textbox = No use of this extension.
Thank you for all of your suggestions. I am really hoping for an update in this extension. I'll see what I can do to help all of you!
@gordonlu310 Please don't add this or something will be messed trust me because this line color can by changed by setting accent color of the app also it doesn't works in ai2 companion you will have to export apk to see the changes
Yes, but if your accent color is orange, you might want to change the underline color of the text box to red tell the user that there is something wrong.
The accent color feature shouldn't work in the Companion because it writes to the Manifest. But programmatically setting it should work.
@gordonlu310 great extension and thanks for creating it.
Do you maybe know is it possible to detect the TAB with your extension?
I have a barcode scanner that after the scanned text sends the TAB and would like to detect when this happens so that I could trigger a code block. I know that there is an ENTER listener in the Taifuns Textbox extension, but do you maybe know how to detect the TAB?
Thanks,
Davor
I haven't tried that out yet, but it seems impossible with my extension, because "tab" is an invisible character.
You can use the PasswordTextBox component for that as it can toggle password visibility. You can still customize the PasswordTextBox component with this extension as PasswordTextBox should be a text box.
Thanks, I never know this block
,
since this is not shown in property panel in designer view.
You can even do it without an extension. Tab in android is \t. Use the "contains" block to detect if there is a "\t" in the text, if true it is a tab.
I just realized this is an old question...
@gordonlu310 Thanks for this extension . Please Update this extension, it's really mind blowing extension. I am very happy #HappyUser .
@gordonlu310 Now easy for Update
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.widget.TextView;
@SimpleFunction(description = "Sets the color of the bottom underline of the TextBox.")
public void SetUnderlineColor(AndroidViewComponent textBox, int color) {
EditText editText = (EditText) textBox.getView();
editText.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_IN);
}
I installed it, thank you.
Where is this element?
It's a generic block. You can get it in three different ways:
- Typeblocking
- Right clicking on any existing textbox set text block and choosing the Make Generic option
- Under the Any Textbox pallette below the existing component pallette