I have a CustomListActivity
which I wish to expose two facets of the same data.
For example: I have a list of cars, and would like to list the set of colors, and the set of models. These would be filtered on mimetype from my ContentProvider
:
org.acme.cars.cursor.dir/colors org.acme.cars.cursor.dir/models
My CustomListActivity
is quite involved, but general enough to be re-used, but:
So, my question is:
Can I declare two activities in the AndroidManifest.xml, each one with the same class, parameterizing it, or do I need to use some switch from within the class?
为什么不将其保留为单个活动,将布局保留在单独的XML文件中,并使用setContentView在它们之间进行切换?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.