Creating Activities Dynamically In Android
Solution 1:
How does android register an activity from the android manifest file
you should have look HERE to get All the Information about how Android Menifest file Works and how you can register your activity in it.
Is there a way to tweak the android source to create an API to dynamically create and register activities ?
AFAIK you can not able to Create Dynamic Activity as it will not be defined in Android Menifest file. you must have to defined it to Manifest file to create an instance of that Activity to Use it in your Code.
Solution 2:
No you cant create an activity dynamically because there is no API to modify content on manifest file dynamically. How ever you can change the layout of your activity according to your need...
Solution 3:
no way to do this via code. you should register activity in manifest.
Create an activity which contains fragment. Later you can create several instances of this activity and load different fragments in runtime with different content and logic.
Post a Comment for "Creating Activities Dynamically In Android"