ICS style EditText

mitsusdev

Member
Licensed User
Longtime User
Hi,
i've a question about ICS style. I've follow the guidelines about minsdkversion for ICS support. All work fine, but i've a problem with forms (EditText, checkboxes, ecc)
I've set backgroud color white and i no longer see the edittext.

I would like to have the EditText of a different color from white (see attached view)

What's wrong?

Regards
 

Attachments

  • ics_login.png
    ics_login.png
    21.2 KB · Views: 773

mitsusdev

Member
Licensed User
Longtime User
Try this:
B4X:
Dim p As Phone
EditText1.Background = p.GetResourceDrawable(17301528) 'Value of Android.R.drawable.editbox_background.

Thanks for your fast response Erel,
i've set it, but i have'nt ICS style. See screenshot below.
How do I figure out what in this case the code from R.drawable | Android Developers?

Regards
 

Attachments

  • ics_login2.png
    ics_login2.png
    22.9 KB · Views: 675
Upvote 0

mitsusdev

Member
Licensed User
Longtime User
Not sure that I understand your question...

OK Erel, I'll explain.

I want to use for my form basic ICS gui for EditText (for Example Text Fields | Android Developers....in practice without the top and side edges).

I'm not able (following your advice) to find the appropriate code.
B4X:
EditTextUsername.Background = p.GetResourceDrawable(17301528)
For example, using your code (17301528), i've an editText with complete bordelines.

...In practice I would get the default layout for ICS (see attachment....i've added a bitmap background image for the username edittext in this case. Is it possible to change color at editText using default ICS UI? )

Thx and regards
 

Attachments

  • ics_login3.png
    ics_login3.png
    22.1 KB · Views: 543
Last edited:
Upvote 0

mitsusdev

Member
Licensed User
Longtime User
You should instead use a platform theme.
Add this line to the manifest editor:
B4X:
SetApplicationAttribute(android:theme, @android:style/Theme.Holo.Light)
Make sure that you reference android.jar from level 13 or above.

Erel,
now all work fine!! Where can I find all the directives to pass to the manifest file? [SOLVED] http://www.b4x.com/android/wiki/index.php/Manifest_Editor

Thanks a lot. :sign0098:
 
Last edited:
Upvote 0
Top