Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View(s) not visible on Android Jelly Bean

I'm currently developing an application with which a schedule can be retrieved and viewed. To display the schedule I used the TimeRulerView (and BlocksLayout and BlockView) java source files from the Google IO 2011 app because I liked the look and feel. Source code can be found here: https://github.com/underhilllabs/iosched2011 . (Google replaced there one with the code of IO2012).

Since my Galaxy Nexus updated tot Jelly Bean (4.1.1) yesterday the TimeRulerView (and/or one of the others) doesn't get shown anymore.

The weird thing is that they are actually still there, but there not visible. I can see a scrollbar of the length the timeruler normally has. Also when I normally click on an block in the view I get a little pop-up, and this still happens when not seeing the timeruler or a block.

I tested the original IO2011 app on my JB GN but nothing is visible there either, so the problem lies within (one of) the view(s) or the way JellyBean is rendering the view(s) (project butter maybe?).

See here ( https://dl.dropbox.com/u/7102660/TimeRulerView_JellyBean_problem.zip ) for screenshots on ICS (app working), JB (app not working) and the GoogleIO2011 app.

like image 946
PieterAelse Avatar asked Jul 18 '12 11:07

PieterAelse


1 Answers

Could this be something to do with Hardware acceleration? I just recently ran into an issue on couple phones with ICS, but not all phones/devices were affected. Adding the hardwareAccelerated tag to my manifest didn't fix the issue either, and I had to define it on specific views that I did not want to be hardware accelerate. My solution used android:layerType="software" in my xml layouts and setLayerType(LAYER_TYPE_SOFTWARE, null) in the java code.

EDIT: Testing this more, it didn't fix my issue using setLayerType on Jelly Bean. Setting the layer type to software on ICS did fix my issue. The only way I could make the views show up was setting the whole application or specific activity to android:hardwareAccelerated="false".

like image 138
Chris Feist Avatar answered Sep 17 '22 22:09

Chris Feist