How to put elements on top of each other in the same xml layout?

前端 未结 2 1568
盖世英雄少女心
盖世英雄少女心 2021-01-22 07:48

How can I have more than one button, or a button and a text view in the same location in one layout but one on top of the other?

I want to have a button that is hidden m

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-22 08:26

    Use TextView.setVisibility(View.VISIBLE) or TextView.setVisibility(View.GONE) depending on your condition and you may not need to put elements on top of each other in the layout.

提交回复
热议问题