2016-02-10 29 views
-1

我在android studio的res文件夾下創建了一個anim文件夾。我想在資源文件夾下創建anim文件夾沒問題。現在我正試圖將該文件放在anim文件夾中,並且這是一個正在進度條中使用的文件。

但我的應用程序獲取故障載明下列行:

產生的原因:org.xmlpull.v1.XmlPullParserException:二進制XML文件行#2:無效的繪製標籤SETE

我我試圖將進度條設置爲列表視圖的空視圖。 所以這就是我究竟做

我在做什麼

動畫> loading_roataion

<?xml version="1.0" encoding="utf-8"?> 
<set xmlns:android="http://schemas.android.com/apk/res/android" 
    android:interpolator="@android:anim/linear_interpolator" 
    > 
    <animated-rotate xmlns:android="http://schemas.android.com/apk/res/android" 
     android:drawable="@drawable/iconloading" 
     android:pivotX="50%" 
     android:pivotY="50%" /> 
    </set> 

我main_activity.xml

///..... 
<ProgressBar 
    android:id="@+id/loading" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:indeterminateDrawable="@anim/loading_rotation" 
    android:layout_centerInParent="true" 
    android:visibility="visible" /> 
    ........ 

和主要活動是這樣

customListView.setEmptyView(findViewById(R.id.loading)); 

設置,但我不知道是什麼問題。我遵循this鏈接的所有步驟。

+0

我覺得這件事情是創建問題 <集的xmlns:安卓= 「http://schemas.android.com/apk/res/android」 機器人:插值= 「@安卓:動畫/ linear_interpolator」 > –

+0

在哪個文件夾中添加'iconloading'可繪製? –

+0

所以我需要做什麼? –

回答

0

我發現這是很容易我只是改變了它通過以下方式

<rotate xmlns:android="http://schemas.android.com/apk/res/android" 
android:drawable="@drawable/iconloading" 
android:fromDegrees="0" 
android:pivotX="50%" 
android:pivotY="50%" 
android:toDegrees="1080" /> 

及其工作鏈路魅力答案。

相關問題