android - View is drawing only over buttons and textViews on 1 device but not others -


I have a custom view called Gameview, where my game has been dragged, there is also a child view called Paused Weve for GameView Works as an overlay. When the game is stopped, then Paused Weave is visible and the screen gets 50% opacity black overlay and 4 buttons.

My problem is that my LG Optimus S (Android 2.3.3) should not be visible on those buttons. They are there and you can click on then, but they have not been shown. In addition, black overlays only appear on buttons and text views within gameview. If I navigate away, then goes back to the activity, it all looks normal.

This bug is not on my Motorola Xoom (Android 3.2.1) or My Motorola Drood (Android 2.2.3). . It was not even on my Optimus till recently (I think I got service updates about the time).

Screenshot of what I'm talking about:

I call PostVinitiate () on GameView and PausedView Have tried, but it does not help.

Has anyone ever encountered someone like this?


Update: I tried to remove the invisibility setting from XML and use this code, but it still does not work, I set the visibility on long ideas after it was made I was able to improve it, but I can not find the right place to call those tasks during creation.

  // Use the XML Layout Set Contentview (R.Lay Out.man); // Define the scenes of this activity gameView = (GameView) ViewById (R.id.gameView); PausedView = findViewById (R.id.pausedView); Win visual = search vviid (rid.quintree); PausedView.setVisibility (View.INVISIBLE); VictoryView.setVisibility (View.INVISIBLE);   

Update:

fixed it using

  pausedView.setVisibility (see GONE); VictoryView.setVisibility (View.GONE);    

Yes, I think I have encountered something similar. In my application, I found a frameview with an image source and an overlay. It looks fine on my Android 4.0.3 device, but with the 2.3.x device (or earlier) they do not appear when they appear.

My only solution so far is not to set the view invisible in the XML file and after invoking the layout, turn invisible (or gone) after it, everything works fine.

Comments