Can I create Fragment ListActivity with compatibility package v4?

徘徊边缘 提交于 2019-12-03 02:41:54

Nope, doesn't exist. Stupid support library.

The solution is easy to create but tedious to maintain. Just copy the native ListActivity class into your project, rename it "FragmentListActivity", and let it extend FragmentActivity instead of Activity. No other tweaks are required and the copy is easy. If you are uncertain you can peak at my code, but it's always best to derive the latest.

Same goes for GridActivity I would say.

yes you can create the Fragment ListActivity with compatibility with viewpager package v4

Here is the example

another example

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!