簡體   English   中英

如何獲得標准的Android 4.1 ProgressBar布局?

[英]How to get standard Android 4.1 ProgressBar Layout?

我只是想知道,為什么我沒有標准的Android 4.1 ProgressBar布局。 在我的AndroidManifest.xml中,我定義了

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="de.wucop.quiz3"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="19" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_icon"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Light.NoTitleBar" >

    ...

</manifest>

和像這樣的ProgressBar

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/transparent_sq_white" >

    ...

    <ProgressBar
        android:id="@+id/pb_list_item_level"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/tv_list_item_level_title"
        android:layout_alignRight="@+id/iv_list_item_go"
        android:layout_below="@+id/tv_list_item_level_title"
        android:max="100" />

</RelativeLayout>

但是我只是獲取Android 2.3.3布局( http://p07.imgup.net/Screenshotafb3.png )。

我究竟做錯了什么? 感謝幫助!

您已明確告訴Android使用Holo之前的主題( Theme.Light.NoTitleBar )。 如果要使用全息窗口小部件主題,則需要使用API​​級別11+上植根於Theme.Holo內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM