android 图像淡入淡出资源问题(Button can't be cast to ImageView)

来源:互联网 发布:php utf8转换为gbk 编辑:程序博客网 时间:2024/06/05 03:30
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_marginRight="52dp"
        android:text="Button" />


    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_marginLeft="49dp"

        android:text="Button" />

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:src="@drawable/transition" />

</RelativeLayout>

貌似交换一下imageview的位置就可以了,把它的代码放到button的上面


0 0