RelativeLayout两个控件重叠,点击上层的控件使下面的布局不响应处理的处理方法 <RelativeLayout android:id="@+id/rl1" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/btn_qd" android:layout_width="match_parent" android:layout_height="match_parent" android:text="@string/btn_ok" android:textSize="12sp" android:textColor="@color/white" android:layout_alignParentRight="true" android:background="@drawable/shape_shezhi" android:layout_marginLeft="20dp"/> <View android:id="@+id/ll_bg" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="false" android:background="#e0000000" android:alpha="0.7" android:orientation="vertical"/> </RelativeLayout>
代码里这样写: View mllBg = (View)mRlPwdInput.findViewById(R.id.ll_bg); mllBg.setOnClickListener(null);
问题解决