I'm creating an Android app with PhoneGap. I'm using HTML + CSS + jQuery, I don't use jQueryMobile, or any other mobile frameworks, because it's a simple app.
My problem is that, if I set android:hardwareAccelerated="true"
, the app is much slower than I set it android:hardwareAccelerated="false"
, but when I set hardware accelerated false, my CSS3 transitions don't work well.
For example I have a transparent cover div, when the sidebar is open:
div.cover {
position:absolute;
top:100px;
bottom:0;
left:0;
right:0;
z-index:99;
background:rgba(0,0,0,0.3);
visibility:hidden;
opacity:0;
transition:all 0.5s ease-out;
-webkit-transition:all 0.5s ease-out;
}
div.cover-in {
visibility:visible;
opacity:1;
transition:all 0.5s ease-out;
-webkit-transition:all 0.5s ease-out;
}
I'm adding and removing cover-in
class to div.cover
with jQuery to apply the effect.
With hardware accelerated on it works, but the whole app is slower, with hardware accelerated off there's a black blink before the effect fires.
Is there any suggesstion to fix this problem?