2013年9月7日星期六

After the splash screen android hardware acceleration how to do?Jia.

In 4.0.4, has been no focus, and later used the hardware acceleration is

android: hardwareAccelerated = "true"


webview splash screen and then found serious, especially open the page inside the login box or something, as long as the keyboard pops up, or eliminate, the screen is very serious.

now must be added to the program android: hardwareAccelerated = "true", webview must also be accelerated.

online method is all


setLayerType (View.LAYER_TYPE_SOFTWARE, null);


This is the webview the hardware acceleration off. After setting LAYER_TYPE_SOFTWARE will save the current view into a bitmap. So you can not open multiple webview, otherwise it will be reported out of memory.


solution is added to webview:

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec) {
invalidate ();
super.onMeasure (widthMeasureSpec, heightMeasureSpec);
}



But this does not work, ah, as long as the set up
setLayerType (View.LAYER_TYPE_SOFTWARE, null), focus on another no. . .

pursuing big God, how both acceleration, without splash screen yet. Thank you very much ah. Jia.
------ Solution ---------------------------------------- ----
hardware accelerated graphics transform just have significantly improved, if you do not do animation interface (translation, rotation, etc.), do not open, do not setLayerType (View.LAYER_TYPE_SOFTWARE , null) open soft buffer
------ reference -------------------------------- -------
share, hoping to rescue heroes soon!
------ reference -------------------- -------------------
I encountered situations similar to yours, find great God, I used iscroll if hardware acceleration is turned off it will not splash screen, but Slide the very card, slide the hardware acceleration turned on smoothly, but it will splash screen
------ reference - --------------------------------------
landlord resolved not ah

没有评论:

发表评论