I'm new in android.I want to make layout same like Etsy application.In my xml layout i have imageview behind the content layout.When the user scroll the content layout will be overlay on the imageview.I was put other layout with same size with imageview but i can't touch imageview .How can i touch the behind layout(ImageView) in this situation.
<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>
The ideal same like this :
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
Set Layout "clickable" attribute value as "false"
android:clickable="false"
I hope it will works for you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.