What is the difference between view and activity in android development?

后端 未结 7 748
南旧
南旧 2021-02-04 01:37

When do I need to create a new activity and when do I need to change the view?

My app needs to do:

Screen #1

two big buttons(sort of menu)

Scr

7条回答
  •  臣服心动
    2021-02-04 02:11

    You should create 4 xml files... and play Around changing content using setContentView(R.Layout.yourxml);..

    you can do this using single Activity.. it depends on how big the class becomes.. if its too heavy with lot of different stuff, for the sake of cohision and to avoid coupling use multiple Activities

提交回复
热议问题