How to change android theme color [duplicate] - android

This question already has answers here:
Changing the color of over scroll in scrollview in android
(2 answers)
Closed 9 years ago.
I need to change the color of blue glow that appears when you can't scroll anymore.
How can I change it app-wide?

You'll need to make your own overscroll drawable in the right color. You can see how to set the drawables in this answer.

The blue glow is created with the EdgeEffect class. There is a third party library called EdgeEffectOverride that allows you to style the EdgeEffects of ListView's and ScrollView's without having to create any custom images.

Related

Android Studio CardView is always transparent [duplicate]

This question already has answers here:
CardView background color always white
(9 answers)
Closed 2 years ago.
I am trying to use Cardview but it somehow doesnt show the background, its always tranparent.
I tried to change the background with cardBackgroundColor but it doesnt work, it stays transparent.
How can i change the background?
enter image description here
I suspect it isnt picking up cardBackgroundColor because you dont have the app namespace. Ensure you have the app namespace in the top container element of your layout
xmlns:app="http://schemas.android.com/apk/res-auto"

How to make custom button design in Android [duplicate]

This question already has answers here:
Custom circle button
(11 answers)
Closed 6 years ago.
The button I'm looking to make has text (Apply), an image (tick mark) and an outer border coloured white background, and an inner background with grey color as you can see in the screenshot.
You can use FloatingActionButton.
This extends ImageButton so you will need to create an image of what you want your button to look like. You can make have circular boundaries using XML styles.
A related answer here has more options and detail.

Android 5.0 (Lollipop) widget button's text are in ALL CAPS [duplicate]

This question already has answers here:
Why is my Button text forced to ALL CAPS on Lollipop?
(20 answers)
Closed 8 years ago.
I have a simple homescreen widget with a few buttons on it. My problem is that when the widgets are running on Lollipop the button's text are all capitalized, any previous Android version doesn't have this problem. The buttons in the layout.xml are very ordinary buttons: no styling or special sauce, just a width height and text size. The interesting thing is that any TextViews I place into the widget aren't affected by this in Lollipop, ie. it appears that only Button objects have this issue.
My AppWidgetProvider is pretty simple too: just sets the sets the text and a PendingIntent for each button.
It sounds like a global styling problem, but I can't find anything in my application's resources that would cause this. Does anyone have any input to this problem? Thanks!
You have 2 options :
1.Use android:textAllCaps="false" in your layout-v21 (or anywhere)
Programmatically change the transformation method of the button. mButton.setTransformationMethod(null);

Android: Gradient Color for Button Text [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Text with gradient in Android
I'm trying to make a button for my app with a white background and gradient-colored text. However, everything I've found gives advice for making only the background a gradient color using a separate XML file. Can someone please tell me if it's possible to have only the text of a button colored with a gradient and how to do so?
Make a clickable textView with gradient color and set its background as you wish.
Follow the link specified by #SidharthLele.

border for EditText? [duplicate]

This question already has answers here:
Is there an easy way to add a border to the top and bottom of an Android View?
(25 answers)
Closed 8 years ago.
I saw many related discussions but didn't find a suitable solution. What I need to do is to create a black border on the top and the bottom sides of an EditText widget. Is that possible?
This is possible with a NinePatchDrawable background.
http://developer.android.com/guide/topics/resources/drawable-resource.html#NinePatch
Yes, it is. Just create your custom EditText or set a suitable drawable as a background.

Categories

Resources