B4A Code Snippet Change EditText Colors - Erel    Dec 26, 2017   (24 reactions) https://www.b4x.com/basic4android/images/SS-2017-12-26_09.04.32.png
1. Add:
#AdditionalJar: com.android.support:support-compat
2.
Sub SetBackgroundTintList(View As View,Active As Int, Enabled As Int)
Dim States(2,1) As Int
States(0,0) = 16842908 'Active
States(1,0) = 16842910 'E B4A Question B4A Numpad .... How to remove the thin line below the numbers - Lucas Siqueira (first post)    May 02, 2021   (1 reaction) you can change the background color of edittext ..
add the XUI lib to your project ...
and add the lines:
Dim xui As XUI
Dim bb As B4XView = flEditText1.EditText
bb.SetColorAndBorder(xui.Color_Red,1dip,xui.Color_White,10dip)
112624
Private Sub LoadPanelLayout
slidingPanel.LoadLayout("Numpad B4A Question [Solved] Remove underline in edit text - mohdosala (first post)    May 25, 2024 this thread is also quite helpful: Change EditText Colors
Using that method mentioned in that link, you can get access to edit text placeholder color. Then you can change its alpha to 0. Therefore, it gets invisible.
Dim a As XUI
a.Color_ARGB(0,0,0,0) B4A Class Edittext Cursor Color - npsonic    Dec 09, 2018   (6 reactions) There weren't any simple way to change EditText cursor color programmatically, so here it is.
Should work with API level 15 and newer.
Private Sub Class_Globals
Private jo As JavaObject
End Sub
'Support for Android 4.0.x
'stackoverflow.com/questions/25996032/how-to-change-programmatically-edit B4A Question EditText Background color in the designer - Erel (first post)    Aug 09, 2015 There is no simple way to change the EditText color. Not with the designer and not by code. The EditText is based on a nine-patch image so it is not possible to just change its color.
The simplest way to deal with the colors is to use the default colors. You can change to a light or dark theme in t B4A Question EditText SelectAll Color - Erel (first post)    Apr 03, 2019   (1 reaction) This is Klaus code, not mine.
You can change the selection color with:
Dim jo As JavaObject = EditText1
jo.RunMethod("setHighlightColor", Array(Colors.Red)) B4A Question Change EditText Cursor Color - Mike1970 (first post)    May 28, 2021 Thanks. With this method i don't have to add the edittext into the designer?
At the moment i style the edittext bycode with the colorDrawable, it interfiers? B4A Question EditText color - Erel (first post)    Aug 13, 2018   (1 reaction) There is no simple way to change the EditText background color as its background is actually a complex layout. It will be simpler to put them inside panels and change the panels color. B4A Question [SOLVED] B4XFloatTextField Text Line Color Change - Erel (first post)    Nov 18, 2020   (1 reaction) You can change the color of EditTexts (=B4XFloatTextField.TextField) with: https://www.b4x.-edittext-colors.87653/#content B4A Question Change All Text Properties of Edittext View dynamically in code - William Lancee (first post)    Feb 24, 2021   (1 reaction) Initialize("") takes only one parameter, the event name. So not there.
By using B4XView as a wrapper for the EditText you can do all you need to do.
I tend to put this type of code in a Sub.
'Include the XUI library and put Private xui as XUI in Processs_Globals
Private et As EditText 'I Page: 1   2   3   4   5   6   7   Powered by ColBERT |