two different layouts for one activity

后端 未结 5 1283
春和景丽
春和景丽 2020-12-08 15:57

Is it possible to have two different layouts for different cases in the same activity or do I have to use intent to call another activity with a di

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 16:09

    Here is best solution for you ViewFlipper.
    ViewFlipper is a Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip between each child at a regular interval. Here is good example of viewflipper.
    You can also look at this.
    EDIT: -One StackoverFlow answer for you

提交回复
热议问题