I want to implement "Swipe to Unlock" widget (https://github.com/ebanx/swipe-button 0.4.0) in a tabbed layout with 3 tabs. While swiping on the widget itself it is changing tabs.
Even after keeping the widget on the left most tab, and then swiping to the right is resulting in similar outcomes (tries to switch to the next left tab which is not present i.e. shows end of tabs/layout hint),See the images for better visual understanding
Is there any way I can accomplish that, where swiping results in swiping of widget not tab?
Image for 'On Swiping on the widget'
Left Tab XML:
<RelativeLayout 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<com.ebanx.swipebtn.SwipeButton
android:id="@+id/SwipeButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_centerInParent="true"
app:inner_text="Swipe TO Unlock"
app:inner_text_background="@color/black"
app:inner_text_color="@color/white"
app:inner_text_size="16sp"
app:inner_text_bottom_padding="18dp"
app:inner_text_top_padding="18dp"
app:button_image_disabled="@drawable/ic_lock_open_black_24dp"
app:button_image_enabled="@drawable/ic_lock_outline_black_24dp"
app:button_left_padding="20dp"
app:button_right_padding="20dp"
app:button_top_padding="20dp"
app:button_bottom_padding="20dp"
app:button_background="@drawable/round_button" >
</com.ebanx.swipebtn.SwipeButton>
Tabbed Activity's XML
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:weightSum="10"
android:background="#1D1D1D"
tools:context="com.digitalcrafts.tjay.trailindiactor.TabbedActivity">
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="9"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />