Friday, March 28, 2014

Has anyone met setVisibility (View.GONE) does not work?


posts by sbyniwwg edited 2012-12-10 16:25:15
Part of the code
 System.out.println ("Visibility before --->" + categoryBox.getVisibility ()); 
categoryBox.setVisibility (View.GONE) ;/ / no effect, the reason is not clear **************
System.out.println ("Visibility after --->" + categoryBox.getVisibility ());


The output
12-10 08:20:45.807: I / System.out (1087): Visibility before ---> 0

12-10 08:20:45.807: I / System.out (1087): Visibility after ---> 8

categoryBox is ReltiveLayout
After the implementation of the interface where the controls also shows there are not hidden
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Therefore, this situation only occurs, the likelihood is great categoryBox the object behind the process is set up references to other places where LZ added wrong! Or continue to analyze the code in the process towards coming setVisibility (View.GONE)
Reply:
Certainly play a role, because you can put this code is copied to a blank layout inside to control. As for why they show, they call you definitely somewhere else I have encountered this situation before
Reply:
Encountered. . . . Sure enough valid. . . . Strange. . . Certainly unscrupulous manufacturers to modify the sdk. . .
Reply:
Did not. . . . . I was wrong

reference to the third floor macleo reply:
met. . . . Sure enough valid. . . . Strange. . . Certainly unscrupulous manufacturers to modify the sdk. . .

Reply:
I have encountered here
Reply:
May I ask how you solve, I have encountered!

No comments:

Post a Comment