I build an android project with targetSdkVersion="15" & minSdkVersion="8", then add a horizontal progressbar in activity, but it not holo style when I run this project with android jelly bean.
What can I do? to edit values-v14 style.xml?
layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ProgressBar
android:id="@+id/countdown_progressbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@android:style/Widget.ProgressBar.Horizontal"
android:max="30" />
values & values-v14 style.xml
<style name="AppTheme" parent="Theme.Sherlock.Light" />
Thanks a lot.
You will need to get the resources for the progessbar. You can get them from http://android-holo-colors.com/ with the styles.xml file or use the HoloEverywhere library: https://github.com/Prototik/HoloEverywhere
Use ?android:attr/progressBarStyleHorizontal
instead of @android:style/Widget.ProgressBar.Horizontal
.
As I understand this, ?android:attr/progressBarStyleHorizontal
is current theme styled progress bar style whereas @android:style/Widget.ProgressBar.Horizontal
is just plain android progress bar style.
The code should look like:
<ProgressBar
android:id="@+id/countdown_progressbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal"
android:max="30" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With