2016-02-10 27 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" /> 

及其工作链路魅力答案。

相关问题