Foreground view touch to pass lower layers (view behind)

535 views Asked by At

I have layout in the background with view pager and on top of that i have layout which has the text layout.Since background view has view pager and should be visible i have given some padding to the top view.

Here is the layout :

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <FrameLayout
        android:id="@+id/frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <ViewPager
            .... />

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent" >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                **android:paddingTop="150dp"** > <!-- padding to take some space on top>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/rounder_shape"
                    android:layout_marginLeft="10dp"
                    android:layout_marginRight="10dp"
                    android:orientation="vertical" >

                    <TextView
                        android:id="@+id/textView1"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/hello_world" />

                    ... More text views
                </LinearLayout>
            </LinearLayout>
        </ScrollView>
    </FrameLayout>

</LinearLayout>

I need to get the view pager to accept touch from the top view or layout.

What i have tried so far :

1) Have tried with InterceptTouch but was not successfull.

2) Also have looked into link Here but it did not help me.

0

There are 0 answers