setVisibility(View.VISIBLE) doesn't always work. Ideas?

前端 未结 5 1198
广开言路
广开言路 2020-12-25 14:53

I am trying to show a pair of hidden buttons (using setVisibility(View.VISIBLE), within a RelativeLayout), but it doesn\'t always work. The button

5条回答
  •  清歌不尽
    2020-12-25 15:36

    I (annoyingly) had similar difficulty with having a button on top of a SurfaceView preview and had to put the Button in a RelativeLayout and make the RelativeLayout VISIBLE/INVISIBLE. Might be worth a shot for anyone else having the same issue.

    ...And I also had to programatically call the layout to be brought to from: buttonLayout.bringToFront() right after findViewById.

提交回复
热议问题