资源$ anF文件夹中的NotFoundException

时间:2016-02-10 09:15:13

标签: android listview android-animation android-progressbar

我在android studio的res文件夹下创建了一个anim文件夹。我想在资源文件夹下创建anim文件夹很好。现在我试图将文件放在anim文件夹中,这是一个正在进度条中使用的文件。

但我的应用程序崩溃说明以下行:

  

引起:org.xmlpull.v1.XmlPullParserException:二进制XML文件行#2:无效的drawable标签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>

my 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链接中的所有程序。

1 个答案:

答案 0 :(得分:0)

我发现答案非常简单,我只是按照以下方式更改了

reg.B.Field1 = 10; // actual value: reg.B.Field1 = 0 (because 10 = b'0000 1010, Field1 is 1 bit field then the mask is `1^2 - 1 = 1 (b'1)`), 10 & 1 = 0)
reg.B.Field3 = 7;  // actual value: reg.B.Field3 = 1 (because 7 = b'0000 0111, Field3 is 1 bit field then the mask is `1^2 - 1 = 1 (b'1)`, 7 & 1 = 1)
reg.B.Field4 = 24; // actual value: reg.B.Field4 = 8 (because 24 = b'0001 1000, Field4 is 4 bits field then the mask is `4^2 - 1 = 15 (b'1111)`, 24 & 15 = 8)

及其工作环节的魅力。

相关问题