I asked some questions recently. TabLayout for AppBarLayout, Scrollable TabWidget or TabLayout
Nonetheless, I am using TabLayout
for scrollable
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable"/>
Certainly, I am creating a Camera
. So, I want to add TabContent
.
Like I used for TabHost
. I want to use TabContent
and TabLayout
together.
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/tab1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/tab2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/tab3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</FrameLayout>
While I am using NonSwipeableViewPager
and TabLayout
together. I am unable to use those fragments from Camera
. I meant I can use those fragments
from their fragment
class. I want to use those fragments
from my CameraActivity
. How to do that?