Android Question ? Difference WebView and native Browser

GMan

Well-Known Member
Licensed User
Longtime User
I am calling a Ajax webside from an ARDUINO Webserver with a webview in my App.
All sending, receiving, switching, reading and displaying datas etc. works fine.
BUT: in the webview i have a little different view as in the native browser.

The webiew didnt display i.e. the javascript clock NOT, but the weather script.
And it displays the shown buttons NOT with transparency (but the are .png's created by javascript on the webside).

Has anyone a solution ?
(Pic1 is browser, Pic2 is webview)
 

Attachments

  • Screenshot_2014-07-22-13-35-20.png
    84.4 KB · Views: 218
  • Screenshot_2014-07-22-13-37-38.png
    75.6 KB · Views: 224

GMan

Well-Known Member
Licensed User
Longtime User
Yes - and target is 20
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
IF YOU don't know that - how should i ?
The Device has 4.2 onBoard

As written, all buttons are generated by javascript code in the html-page


Here is my manifest:

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="20"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

AddApplicationText(
<activity android:name="com.dropbox.sync.android.DbxAuthActivity" />
<activity
  android:name="com.dropbox.client2.android.AuthActivity"
  android:launchMode="singleTask" >
  <intent-filter>
    <data android:scheme="db-xxxxxxxxxxxx" /> <!-- NEED TO UPDATE -->
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.BROWSABLE" />
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>
</activity>
<service
  android:name="com.dropbox.sync.android.DbxSyncService"
  android:enabled="true"
  android:exported="false"
  android:label="Dropbox Sync" />  )
AddReplacement(<uses-permission android:name="android.permission.INTERNET" />,)
AddReplacement(<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />,)

And here the code of such a button:
CSS-part of the html-page

html-part of the page:
 
Last edited:
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
Both times yes, Erel.
Where you can see that difference ?
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
شكرا - i will give it a try.
Its clear that the prob is on the javascript side, so we'll see.
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
Meanwhile...
i made a Pic from the SAME soft on an old 2.1 Tablet : awesome !
All is displayed correct ???
 

Attachments

  • 2014_07_23_19.44.29.png
    52.1 KB · Views: 185
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
...and no change in the view when using webviewextras
 
Upvote 0

Shahid Saeed

Active Member
Licensed User
Longtime User
...and no change in the view when using webviewextras
I hope you had used it in a correct way:

B4X:
Sub Globals   
    Dim www As WebView
    Dim wvxtra As WebViewExtras
End Sub

Sub Activity_Create(FirstTime As Boolean)

   wvxtra.addJavascriptInterface(www, "B4A") ' "B4A" is the namespace you give to Javascript/the website
   www.LoadURL("http://www.YourDomain.com/Page.html")

End Sub
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
Yes, i did it exact like you - no change.
And i also have the webview (wvLAN in my App) created in the designer as in the sample.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…