xml的布局中listview覆盖了circleview

来源:互联网 发布:2017党章党规网络答题 编辑:程序博客网 时间:2024/06/03 17:49
今天做项目的时候遇到了这样的问题,我将播放按钮的布局写在了listview布局的上方,导致加载的时候被listview覆盖了,不能点击,每次点击点击的都是listview的item,放到下方以后就好了。


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >




    <RelativeLayout
        android:id="@+id/rel_above"
        android:layout_width="match_parent"
        android:layout_height="@dimen/pad_height_48"
        android:paddingLeft="@dimen/pad_height_14"
        android:paddingRight="@dimen/pad_height_14" >


        <ImageView
            android:id="@+id/iv_back_guesslike"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:src="@drawable/activity_back_red" />


        <TextView
            android:id="@+id/tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text=""
            android:textColor="@color/main_color_black"
            android:textSize="@dimen/pad_text_size_18" />


        <ImageView
            android:id="@+id/iv_search"
            android:layout_width="@dimen/pad_height_27"
            android:layout_height="@dimen/pad_height_27"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="@dimen/pad_height_14"
            android:padding="@dimen/pad_height_5"
            android:src="@drawable/search_02" />
    </RelativeLayout>


    <TextView
        android:id="@+id/txt_above"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_below="@+id/rel_above"
        android:background="@color/view_bg" />


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/txt_above"
        android:orientation="vertical" >


        <RelativeLayout
            android:id="@+id/rl_net_error"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone" >


            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:orientation="vertical" >


                <ImageView
                    android:id="@+id/iv_reloading"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginBottom="@dimen/pad_height_10"
                    android:src="@drawable/activity_download_katongbj" />


                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginTop="@dimen/pad_height_10"
                    android:text="@string/net_failed"
                    android:textColor="@color/color_personal_answer"
                    android:textSize="@dimen/pad_text_size_12" />
            </LinearLayout>
        </RelativeLayout>


        <RelativeLayout
            android:id="@+id/rl_net_failed"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone" >


            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:orientation="vertical" >


                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginBottom="@dimen/pad_height_10"
                    android:src="@drawable/activity_download_katongbj" />


                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:layout_marginTop="@dimen/pad_height_10"
                    android:text="@string/net_error"
                    android:textColor="@color/color_personal_answer"
                    android:textSize="@dimen/pad_text_size_12" />
            </LinearLayout>
        </RelativeLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >


            <RelativeLayout
                android:id="@+id/rl_loading_animation"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="gone" >


                <ImageView
                    android:id="@+id/imv_loading_animation"
                    android:layout_width="@dimen/pad_height_60"
                    android:layout_height="@dimen/pad_height_60"
                    android:layout_centerInParent="true"
                    android:background="@drawable/loading1_animotion" />
            </RelativeLayout>


            <com.hipad.voice.pulltorefresh.PullToRefreshLayout
                android:id="@+id/refresh_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="gone" >


                <include layout="@layout/refresh_head" />


                <com.hipad.voice.pulltorefresh.PullableScrollView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" >


                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="vertical" >


                        <com.hipad.voice.view.HeadListView
                            android:id="@+id/lv_guess_like"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent" >
                        </com.hipad.voice.view.HeadListView>
                    </LinearLayout>
                </com.hipad.voice.pulltorefresh.PullableScrollView>


                <include layout="@layout/load_more" />
            </com.hipad.voice.pulltorefresh.PullToRefreshLayout>
        </LinearLayout>
    </LinearLayout>


    <RelativeLayout
        android:id="@+id/PlayBntImg"
        android:layout_width="@dimen/pad_height_62"
        android:layout_height="@dimen/pad_height_68"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:background="@drawable/activity_main_tab_buttom_bg"
        android:clickable="true" >


        <com.hipad.voice.view.CircleImageView
            android:id="@+id/circle_imv_button"
            android:layout_width="@dimen/pad_height_40"
            android:layout_height="@dimen/pad_height_40"
            android:layout_centerInParent="true"
            android:clickable="true"
            android:src="@drawable/btn_play_selector" />


        <ImageView
            android:id="@+id/imv_play_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:src="@drawable/activity_album_jiemubofanganniu"
            android:visibility="gone" />
    </RelativeLayout>

</RelativeLayout>
以上代码就是布局文件,标红代码就是播放按钮的布局
0 0