What is the benefit of using Fragments in Android, rather than Views?

前端 未结 6 1625
花落未央
花落未央 2020-11-28 18:51

When developing for Android, you can set your target (or minimum) sdk to 4 (API 1.6) and add the android compatibility package (v4) to add support for Fra

6条回答
  •  失恋的感觉
    2020-11-28 19:42

    Add one case when using Fragment or Activity over CustomView:

    When you are using CursorLoader to observe certain views, ListView or TextView and want to update their display value whenever your ContentProvider's data updates at back end(most common case you have a service which updates your local database by polling data from remote database/cloud periodically)

提交回复
热议问题