How to add Horo Style Horizontal ProgressBar when minSdkVersion is Less than 11?

I create an android project with targetSdkVersion = "15" and minSdkVersion = "8", and then add a horizontal progress bar to the action, but this is not a vocal style when I run this project with an android bean iron.

What can I do? to edit values-v14 style.xml?

location:

<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 ​​and values ​​- v14 style.xml

<style name="AppTheme" parent="Theme.Sherlock.Light" />

Many thanks.

+5
source share
2 answers

You will need to get resources for progessbar. You can get them from http://android-holo-colors.com/ with styles.xml file or use the HoloEverywhere library: https://github.com/Prototik/HoloEverywhere

+2

?android:attr/progressBarStyleHorizontal @android:style/Widget.ProgressBar.Horizontal.

, ?android:attr/progressBarStyleHorizontal , @android:style/Widget.ProgressBar.Horizontal - Android.

:

<ProgressBar
    android:id="@+id/countdown_progressbar"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    style="?android:attr/progressBarStyleHorizontal"
    android:max="30" />
+2

All Articles