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

后端 未结 7 753
南旧
南旧 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:02

    The "right" way to do it is to use Activity for each screen and use the tag for the menu you would like to be in all screens.

    This way you will have the "back" button act as it should be and it would be easier for you to handle when switching screens.

    To use the , you should put the things you want to reuse into extra files. Then you can use it as follows:

    
    
    
    

    In another file include it with:

    
    
    

提交回复
热议问题