Android Question Webview and API level is >=14

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Hi Erel
Hi All

According to:
https://developer.android.com/guide/topics/graphics/hardware-accel.html

I have a problem with webview in many newer devices that doesn't display webview content! they display a white blank screen!

According to android doc url above, i should disable hardware acceleration, i want it done in activity level and in view level (i try in manifest file, it worked for the first activity, others no).

Activity Level:
Code: Copy
<application android:hardwareAccelerated="true">
    <activity ... />
    <activity android:hardwareAccelerated="false" />
</application>

View Level:
Code: Copy
myView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);


Please convert these code to B4A .

Thanks
 
Please avoid. This is a community forum.

I have a problem with webview in many newer devices that doesn't display webview content! they display a white blank screen!
Never encountered such issue.

You can use SetActivityAttribute(Main, android:hardwareAccelerated, "false") in the manifest editor.
 
Upvote 0
According to android doc url above, i should disable hardware acceleration, i want it done in activity level and in view level (i try in manifest file, it worked for the first activity, others no).

So learn how the manifest editor works and set the hardwareAccelerated attribute to false for other activties where required.
What have you added to the manifest editor so far?
 
Upvote 0
Code: Copy
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>
<application android:hardwareAccelerated="false">
</application>)

SetActivityAttribute(Main, android:hardwareAccelerated, "false")
SetActivityAttribute(activitystore, android:hardwareAccelerated, "false")

SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")

Added, but only Main activity affected!, other activities not affected, still blank!

Any suggestion?
 
Upvote 0
You should set this attribute for any activity you like:
Code: Copy
SetActivityAttribute(Activity1, android:hardwareAccelerated, "false")
SetActivityAttribute(Activity2, android:hardwareAccelerated, "false")
SetActivityAttribute(Activity3, android:hardwareAccelerated, "false")
SetActivityAttribute(Activity4, android:hardwareAccelerated, "false")
 
Upvote 0
Back
Top