android - Half blank screen on ResponsiveUI in SlidingMenu -


the slidingmenu demo app playstore works without problem on n7. when compile computer, have following problem in resposiveui activity : when open slidingmenu on portrait , change orientation lanscape mode... half screen blank !

resposiveui in portrait mode responsiveui in landscape mode

i didn't change in code except extending sherlockfragmentactivity adviced here author.

the half blank screen cased slidingmenu demo source code 70 line.

https://github.com/jfeinstein10/slidingmenu/blob/master/example/src/com/jeremyfeinstein/slidingmenu/example/fragments/responsiveuiactivity.java

you can modify

        if (findviewbyid(r.id.menu_frame) == null) {             sm.setbehindoffsetres(r.dimen.slidingmenu_offset);         else             sm.setbehindoffset(getscreenwidth()); 

getscreenwidth()

  public int getscreenwidth() {             display display = getwindowmanager().getdefaultdisplay();             displaymetrics metrics = new displaymetrics();             display.getmetrics(metrics);             return metrics.widthpixels;     } 

Comments