Reputation: 711
I have some activities that extends AppCompatActivity. In my app there is a viewPager and I want some of my previous activity with their ui and functionality in this viewPager. How can I convert activity to fragment at runtime because I need that activities too.
Upvotes: 0
Views: 56
Reputation: 67259
You cannot simply make your Activity into a Fragment at runtime.
You will need to re-implement your UI using a different pattern, perhaps making the re-usable pieces of your Activity into a Fragment instead.
Upvotes: 1