java - How to use Activity in TabLayout Tabs -


i have built 3 activities. now, want display these tablayout tabs. tablayout requires fragments each tab. there converting activity fragments? please me on issue.

how use activity in tablayout tabs

activities-in-tabs deprecated technique 6 years ago.

but tablayout requires fragments each tab

no, not, though common pattern. requires tabs in single activity.

is there converting activity fragments?

i going assume meant:

is there recipe converting activity fragments?

if so, speaking:

  • your activity's setcontentview() call turns return value oncreateview() in fragment

  • your activity's work set widgets typically turns body of onviewcreated() in fragment

  • much of rest of logic stay is


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -