EditText borders SDK >11 - android

I've an activity with few EditTexts, it shows the underlying borders until no background is set. When I set a background for the whole LinearLayout, the EditText's highlighting gray borders go away. Only blue highlights appear when focussed.
How do I get those gray borders like in the screenshot below:

Setting the theme in manifest does the trick:
android:theme="#android:style/Theme.Holo.Light.DarkActionBar"

Related

Delphi TTabControl - easy way to change colour of Horizontal Line

Is there an easy way to change the colour of the horizontal line that appears
when the TAB is active?
Usually it appears as Green... I use Edit Default Style to change the colour to blue/red when Text is active, but I could not find an equivalent for the Green Horizontal line?
(if can't see above Image, see
Is the Green an android / windows / Delphi default? I see some images with green shapes inside the Edit Default Style properties...
Can the Green horizontal line be changed to blue/red easily?
Can the Green horizontal line be disabled (set Invisible) easily without disabling the Active/non-active feature of the Tab text? I suppose I can set the Tab text to non-styled, and then manually change the colour of the Tab Text... but will be less elegant
Thanks for any input. I've checked the web for any link I can find (including How to change the color of active TAB in a TabControl, in Delphi)
The style used to paint the bottom line in the tabitems is TabItemStyle.Top.ActiveLink
You can use the style designer to change which rectangle is used for ActiveLink. For instance, you could click on this property to bring up the bitmaplinks editor, and then drag the rectangle so that the bottom line is not part of ActiveLink, and then your colored line is not drawn.

Underline of Edittext control disappears in Xamarin

I am using the Holo Dark Theme in my Android application in Xamarin. I devided my page (Activity) in different layouts. And I gave one the left layouts a white background (in contrast to the default black background of the Holo Dark Theme).
The Edittext controls in the dark side have the default gray underline bellow the edittext control (right side).
But this underline has now disappeared in the white area. Look at the picture:
I don't know why. How can I make the line visible again?
The bottom border of EditText control is draw as a background on Android. Maybe you changed the background of EditText controls so that the gray bottom borders are disappeared.

Transparent Tint on Buttons

In my Android app, I'm trying to get buttons to be tinted a certain color (either blue, red or gold). The default button tint is grey. Does anyone know how to change the color of the button so that the transparency remains with it?
I tried using:android:background
but that ditches the transparency completely and makes the button one solid color.
I also tried using:android:#color/transparent
but that ditches the color completely in favor of a fully transparent button. I've looked online for a while and found mostly stuff relating to image buttons. The kind that I'm trying to tint is just the standard Button buttons. I'm also guessing that this can be done mostly just through XML. Is that correct?
You could try and create your own button drawable like so...
Take the button drawable from the Android SDK ([ANDROID_SDK_HOME]/platforms/data/res) and import the drawables into your project. Then create a layer list with the button drawable on the bottom and a semi-transparent color on top.

Getting the Listview default clicked color, depending on the Device

In my android application, I use a listview and some linear layout on wich the user can click.
Of course, I had to set the background of my LinearLayout to a xml file where the stated pressed, selected are defined:
myView.setBackgroundDrawable(
getDrawable(android.R.drawable.list_selector_background));
So no problem I set the drawable to transparent when normal use and orange when clicked.
My only problem is that on the galaxy S and some other customized phone (Sense UI) the color of the listview clicked is blue or green!
So I need to pick this color to set it to the background of my linearlayout.
I don't want to mix orange and blue, or orange and green for my user!
Where can I get this color???
That woule be really helpfull!
Just found the answer:
android:background="#android:drawable/list_selector_background"

Android: How to put text underneath a Button?

I have...
PNG file for Background
PNG file for Icon (drawableTop)
Text I want to put underneath this Button
It's similar to a Menu Icon. How to do that? I only found following ways. Both of them arent very nice:
Make two Buttons, one for Text one for the Picture
The Background PNG File needs a transparent area at the bottom in the size of the text.
After some months of working with Android it's not that hard anymore. You can set any View (ImageView, TextView, LinearLayout, RelativeLayout...) clickable.
So in this case I would go with a Relative- or LinearLayout. They also can use the same style, so the position of the icons are always the same.
Set the text as the button text via the attribute android:text. Use the android:drawableTop attribute to set an icon that will appear above the text.

Categories

Resources