This question already has answers here:
Switching application-wide theme programmatically?
(2 answers)
Closed 8 years ago.
i'm encountering an issue. I'm developping an Android application which contains several Activities. And i want to let the user choose black or white design dynamically. My issue is that i don't know how i must change the design for my Activites when they're on the backstack. I though about 2 options :
Change programmatically the color of each view on each activity.
Do two versions of each activity. A black one and a white one and switch beetween them according to the user color choice.
Which one is the better way ? Is there another way to achieve this ?
Regards.
You want to use Themes, and you can apply theme before calling super.onCreate()
Related
This question already has answers here:
How do I change the background color of the ActionBar of an ActionBarActivity using XML?
(21 answers)
Closed 6 years ago.
I am newbie to android and i am working on a demo related to actionbar and fragments,I have done with it but now i want to change the colour of my actionbar,I have tried below link which gives me exception,
Change Color of Actionbar in Android
So,Can anybuddy helps me to do it?
Thanks in advance,Dont close it as i couldnt find any solution so far.So i request you to guide rather than close the question.
I think that this answer will fit all your requirements - change-color-of-actionbar-in-android.
You simply need to modify your Theme.
This question already has answers here:
Android Seekbar with two thumbs
(5 answers)
Closed 6 years ago.
I use a seekbar with two thumb in my application and would like to customize it.
I want to change the drawable(I want to use my own image). How to do it?
Basically you will need Range Bar. User can set Range between two numbers
Check this lib - https://github.com/oli107/material-range-bar
Above library is also supports Material design which provides rich UI
Hope it will help :)
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);
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
PreferenceActivity and theme not applying
I am creating preference screen having 2 panes, One for headers and one for corresponding fragment.
But I want to change layout of these preferences. For fragment I know how to do that.
But I dont know how to change layout of preference headers here. And also cannot find any relevant documentation too.
have you try to use styles and themes to custom your preferenceActivity?
http://developer.android.com/guide/topics/ui/themes.html
This question already has answers here:
Standard Android Button with a different color
(20 answers)
Closed 3 years ago.
I have been looking at these posts:
StateList
, Different states
What I really want is to add an outer-glow or some way to highlight the button onclick versus making different images for the associated states. Is this possible using colors or themes?
Thanks in advance :)
EDIT:
I found a good solution here, not quite the right answer but a good one none the less:
standard-android-button-with-a-different-color
I think you will be better off making an image for the state rather than trying to use software to render this automatically. The software solution will most likely be slower.