代码之家  ›  专栏  ›  技术社区  ›  Falmarri

Android,每个视图模式的活动?或者在更少的活动类中切换语句?

  •  2
  • Falmarri  · 技术社区  · 14 年前

    1 回复  |  直到 14 年前
        1
  •  2
  •   psychotik    14 年前

    创建显示列表的基ListActivity。

    然后,为每个视图模式创建单独的派生类。

    You do want a separate Activity per view. Once a view isn't visible anymore, the OS can reclaim that activity. This helps resource management. Plus, when a view it an Activity it gets to do interesting things in response to user input (for instance, when the search button is hit).