Use [ code ] blocks to make your code easier to read.
In the first case, you are setting the visibility of the button .. where?
In the second case, you are setting it on the button2 onclick handler?
What do you mean by "it flickers"? You aren't being clear. Is it partially visible? Appears and disappears when you do some action? Does so constantly, as if in a loop? Is blocked by button2? What else is on/near button1?
In order to have a hope of getting support on something like this, you first have to approach it as a bug. That means you really need to be specific about what you are doing, and what your terms mean. Ideally, you'll want screenshots. You'll also want to reduce your problem to a minimal set of code that completely describes what is going wrong -- create an android app that contains nothing but the two buttons, and generates the flicker effect you are talking about. (Of course, in doing so, you might work out what code is causing the flicker problem).
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BRLast edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.