Dilemma: when to use Fragments vs Activities:

后端 未结 14 815
失恋的感觉
失恋的感觉 2020-11-22 11:58

I know that Activities are designed to represent a single screen of my application, while Fragments are designed to be reusable UI layouts with log

14条回答
  •  醉梦人生
    2020-11-22 12:06

    In my opinion it's not really relevant. The key factor to consider is

    1. how often are you gonna reuse parts of the UI (menus for example),
    2. is the app also for tablets?

    The main use of fragments is to build multipane activities, which makes it perfect for Tablet/Phone responsive apps.

提交回复
热议问题