Change TimePicker style - android

I want to customize time picker style to default style in Android 4. I want to use this style either I am using Android 2.2 or any version.

You can take a look at Holo Everywhere library which aims to port Holo theme for android 1.6 onwards here: https://github.com/ChristopheVersieux/HoloEverywhere

You'll need to get the TimePicker's source code with all classes & resources that are required, put in in your project and then use them instead of the one's provided by the platform itself.

Related

Problems using App Compat theme instead of Material Theme [duplicate]

This question already has an answer here:
Material Design, AppCompat, and Backwards Compatibility
(1 answer)
Closed 6 years ago.
I would like to use Material theme for my app and target from Jelly Bean to "M".
What's the correct recommendation ?
1. Use appcompat theme on api levels below 21 and use standard material them on 21 and above
2) Simply use appcompat on all the api levels.
Will I be missing anything if I simply use appcompat on all api levels ?
You would use only the AppCompat themes for all. For most stylings, they have their own implementations that mimic more modern approaches. For things that can't be mimicked, they just simply don't do it or move to the default (one that comes to mind is the Ripple effect. 21+ devices it will use Ripple, but on others it will default to the standard button selector). If they can use native approaches, then they will use those instead.
On some cases though, you may need to create styles that contain attributes which unique to a certain API level. In which case you need to create a layout-v## folder where ## is the API level to support. Then put in a Style with the same name as one in the lower layout folder. Android will choose the appropriate folder. The same can be done for any other resource folder.
Use AppCompat for everything, there is built in functionality to handle if you are using < 21 or >= 21.
Really the only time you should use the standard Material Theme is if your base API you support is 21+ but even then you will eventually use app compat for new things that get added

How to use Holo.Theme in ActionbarSherlock?

I was using Theme.Holo as parent in my application before trying to target lower versions of Android OS. To adapt my application to older versions, I have to use ActionBarSherlock library. But it requires the theme of the application be one of ActionBarSherlock's own themes (Theme.Sherlock.Light.DarkActionBar instead of Theme.Holo).
I still need to use Theme.Holo. But it is not possible by default.
Are there any modifications done do make this happen?
Holo theme is not known to older versions of android, ActionBarSherlock defines necessary parts of Holo Style for ActionBar.
If you need to have Same look on older versions (Although it doesn't look native) you can use HoloEverywhere Library.
As an alternative you can generate Holo-Styled drawables using Android Holo Colors Generator Project

How to create blue horizontal line in EditText Android

As in my question title, is it a default theme in Android or I need to do it manually? I want to have it from Froyo devices and above. Any guideline or hint to achieve it?
Are you asking for the Holo theme for older Android versions than 3.0? If you do, then take look at the library HoloEverywhere: https://github.com/ChristopheVersieux/HoloEverywhere
Many developers use it and it does exactly what you expect.

ICS style in Froyo and Gingerbread Apps

I am developing an application for Android and I'm using the API level 8. However I would like this app would use the theme of ICS when running on Froyo and Gingerbread because the theme of the ICS is much more beautiful. I wish that at least the color scheme and shape of the buttons were equal. Is there any way to do this?
The first thing you might want to look at is ActionbarSherlock as it adds a lot of consistency to your pre-ics code, even though this is not directly related to the theme.
Then take a look at the HoloEverywhere project on GitHub for using the Holo theme on apps designed for pre-ics devices.
The best i found is android-holo-colors in which you will get all the controls and also can choose holo-light or holo-dark with custom colors you want.
I hope this will help you
The SDK folder contains most of the themes, styles and drawables used in ICS. Check
SDK folder\platforms\android-15\data\res.
You can apply themes/styles in your app like this

Set Holo theme in older Android versions?

I have used several applications which appear to use Android 4.0's 'Holo' theme, whilst still running on an older version of Android (2.3). Is there a supported way to do this or have these developers designed their own custom themes?
Thanks.
I am working on this:
https://github.com/ChristopheVersieux/HoloEverywhere
EDIT: Moved to: https://github.com/Prototik/HoloEverywhere
Might be really fit your needs.
Look here SDK/platforms/android-15/data/res/
There are all styles and related resource data used on latest Android 4.
You can also download it from here:
https://github.com/android/platform_frameworks_base/tree/master/core/res
And you can grab what you need from here to your app. Only remove android: prefix to use it in you project. This is only way how to defines the same theme as is used in the latest Android versions.

Categories

Resources