Dark ActionBar in Holo Dark - android

I am developing an Android app on Android Studio and I would like to use the Holo Dark theme but in the KitKat version, I mean, how it appears on the picture I attach below.
I'm testing the app on a KitKat AVD, and in the manifest the maximum and target SDK version is 19, but the action bar is like in the pic below:
I just want to get the design like in the first image, so if anyone knows how, please tell me.

You have to use the Solid ActionBar:
<style name="Theme.Whatever" parent="#android:style/Theme.Holo">
<item name="android:actionBarStyle">#android:style/Widget.Holo.ActionBar.Solid</item>
</style>

Related

Android - Control shadow size and colouring the status bar with AppCompat in pre lollipop

I'm using AppCompat ver 22 and I want to achieve the same look and feel for pre lollipop devices.
My styles.xml file looks like that:
<style name="YesNoAppTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">#color/ActionBarBackground</item>
<item name="colorPrimaryDark">#0094b8</item>
</style>
and I'm setting this after onCreate:
getSupportActionBar().setElevation(DisplayUtilities.dpsToPixels(this, 4));
furthermore, I'm using a custom action bar like this:
getSupportActionBar().setDisplayShowCustomEnabled(true);
getSupportActionBar().setCustomView(R.layout.base_action_bar_menu_layout);
and the devices look like that (left 4.4, right 5):
I want to get the size shadow size in 4.4 and the status bar colouring. Is that possible?
Thanks

Actionbar Issue

I want custome actionbar so i edited values-v14/style.xml
Here is what i change in xml file
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<item name="android:height">60dp</item>
</style>
this is my java code where i enabled drawer icon
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setDisplayShowTitleEnabled(true);
Now I run on 4.2 and Up device its fine But when i run 4.1 device it's show back icon not drawer icon any answer must be appreciated.
you can see drawer icon replaced with back
Hear is image of 4.4.4 Device you can check and please help me
In your style.xml
<style name="Theme.mytheme" parent="android:Theme.Holo">
<item name="android:homeAsUpIndicator">#drawable/your_icon</item>
</style>
add any icon you want. Icon mostly depends on Device API level.
Your ask is not clear, however... if i understand, you have an application that runs well on 4.2 devices showing drawer icon on left side (drawer menu navigation i suppose). The same application on 4.1 devices doesn't show drawer icon but back icon.
Be sure that your style.xml is correct.
Note that values-v11/style.xml is for API 11+
For API 14+ you must use values-v14/style.xml is for API 14+
You can try to add a new folder to your project values-v19/style.xml for API 19+ Android 4.4
Look in Android Official API Guides -> App Resources -> Style for more details.
And as last I give you two links resources:
To create ActionBars: http://jgilfelt.github.com/android-actionbarstylegenerator/
Useful tools can be found here: http://romannurik.github.io/AndroidAssetStudio/index.html

android-How to use dark theme for dialog on api8+

this is the dialog I have right now :
as you can see, it's white . How can I use dark theme for this dialog ? I want to make it dark .
I'm using appcompact and I want it to work on api+8 .
I'm sorry to simply link to a library, but that's the only way I know to make that work on such old API levels.
library:AlertDialogPro#github (API 7+)
<style name="YourAppTheme">
<item name="alertDialogProTheme">#style/Theme.AlertDialogPro.Material</item>
</style>
A README and a demo application is included.

Properly set SeekBar style for Holo and pre-Holo APIs

After setting SeekBar with Holo style, I got warning that it's not supported pre-Holo APIs.
If I leave it this way, will this crash the app or pull pre-Holo style anyway? It does not crash on the emulator and I don't have 2.3.3 device.
The reason for asking his is odd behaviour. I tried to manually set style for Holo and pre-Holo using res/values-v11/ directories and placing styles.xml in each and setting the style of SeekBar to style="#style/settings_seekbar" .
Style for API 11+ looked like this
<style name="settings_seekbar">
<item name="android:seekBarStyle">#android:style/Widget.Holo.SeekBar</item>
</style>
and style for APIs older than 11 looked like this
<style name="settings_seekbar">
<item name="android:seekBarStyle">#android:style/Widget.SeekBar</item>
</style>
So it looked like this would work. But on either device with Android 4.0+, I don't see Holo's theme, but the old thick-yellow theme.
If this is the proper way of settings styles (in case the first solution will crash a device), where did I make a mistake thus Holo theme never appeared on newer devices?
It seems we can safely use a theme from the upper SDK because I found no indicators that it will ever crash the app.
If the theme does not exist, Android will use the appropriate lower-level theme.
The error we can see on the image is just a warning that UI will not look the same in the SDKs which do not support this theme.

Theme.Holo with Dark Action Bar

I am making a daydream application and I want the settings activity to follow the same interface as the standard settings. For right now I want to make the app use the Holo theme but have a dark action bar like you can get with the Holo.Light.DarkActionBar theme. I've googled around and have not found anything similar, and I tried looking through the android source code to find out how they do it for the Settings page, but it is too big for me to handle and I cannot find the styling system.
I've got my styles set up but I cannot find the correct value to use for actionbar style. I do not have interest in adding more libraries like actionbar sherlock.
NOTE: Dark Action Bar =/= Holo actionbar.
My app only works with 4.2 and up so the Holo.Light.DarkActionBar theme should exist.
For reference, I want my app to have this theme:
The settings app uses the Widget.Holo.ActionBar.Solid for its actionBarStyle. As in:
<style name="Your.Theme" parent="#android:style/Theme.Holo">
<item name="android:actionBarStyle">#android:style/Widget.Holo.ActionBar.Solid</item>
</style>

Categories

Resources