LeanbackTabLayout is not efficiently working with VerticalGridSupportFragment layout

85 Views Asked by At

I am using activity_main as

<LinearLayout
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/gray_323546"
        android:orientation="vertical">

        <androidx.leanback.tab.LeanbackTabLayout
            android:id="@+id/tabLayout"
            android:layout_width="wrap_content"
            android:layout_height="32dp"
            android:layout_gravity="center_vertical|start"
            android:layout_marginStart="36dp"
            android:layout_marginTop="20dp"
            android:layout_marginBottom="20dp"
            android:background="@color/transparent"
            android:theme="@style/ThemeCustom.TabLayout"
            app:tabBackground="@color/transparent"
            app:tabGravity="start"
            app:tabIndicatorColor="@color/transparent"
            app:tabIndicatorHeight="0dp"
            app:tabMode="fixed"
            app:tabRippleColor="@null"
            app:tabPaddingStart="0dp"
            app:tabPaddingEnd="0dp"
            app:tabTextColor="@color/transparent"
            app:tabUnboundedRipple="false" />

        <androidx.leanback.tab.LeanbackViewPager
            android:id="@+id/viewPager"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />


    </LinearLayout>

There are 4 different Tab inside that. 2 Tabs are using RowsSupportFragment and i can move from list of item to tab and vice versa using top and down keys.

In 3rd and 4th tab, i am using VerticalGridSupportFragment and once i click on tab, it moves to VerticalGridSupportFragment but now i can not select tab again using keys.

0

There are 0 best solutions below