I was opening a solution of Stack Overflow in my webview so mobile version of that page opens in the webview. Now there is one code which requires horizontal scrolling to view it completely. As I start scrolling, my webview start scrolling too. As a result, scrolling on webpage doesn't occur and viewPager scrolling occurs.
I tried this but when i implemented this my swiping was completely disabled. How do disable paging by swiping with finger in ViewPager but still be able to swipe programmatically? I have no idea how can I implement this.
<LinearLayout android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
xmlns:android="http://schemas.android.com/apk/res/android" >
<LinearLayout
android:id="@+id/urlBoxId"
android:background="@color/colorPrimaryDark"
android:elevation="4dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/editTextId"
android:layout_marginHorizontal="3dp"
android:background="@drawable/rectangle"
android:paddingHorizontal="10dp"
android:paddingVertical="8.5dp"
android:textColor="#fff"
android:hint="EnterUrl"
android:inputType="textUri"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="6"/>
</LinearLayout>
<WebView
android:id="@+id/webViewId"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
This is my fragment Layout. I have a linearlayout above webview. I want to disable viewPager swiping when swiping on webview but able to swipe fragment when swiping done on linearLayout.
I am quite new to Android.