[英]How can I select a FrameLayout's views in the Graphical Layout Editor?
[英]how can i touch behind layout in framelayout
我是android的新手,我想要使布局与Etsy应用程序相同。在我的xml布局中,我在内容布局后面有imageview。当用户滚动时,内容布局将覆盖在imageview上。与imageview的大小,但我不能触摸imageview。在这种情况下,如何触摸后面的布局(ImageView)。
<FrameLayout 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"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/test"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:background="@drawable/sl"
android:gravity="center" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/demo"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#345343"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#123456"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world"
android:textColor="#FFFFFF" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="50dp"
android:text="@string/hello_world" />
</LinearLayout>
</LinearLayout>
</ScrollView>
理想的是这样的:
https://www.dropbox.com/s/3d1o4a93qwm4bjn/Screen%20Shot%202014-03-09%20at%2018.50.22.png https://www.dropbox.com/s/rc9p8tgdsh17hyq/Screen%20Shot%202014 -03-09%20at%2018.50.15.png
将“可点击的布局”属性值设置为“ false”
android:clickable="false"
希望它对您有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.