Question

Hy guys, currently I am developing my own app and have some troubles: My plan is to have an app for different things and one of them is a webview. This webview should be called via a button in the main screen of the app. I have read some tutorials about that and searched here at stackoverflow and found some nice solution with a progressbar in the webview. But the problem is: The progressbar works in an app I've made which displays the webview at the starting works perfect. But the one I made with the same code which sould display the webview after a click at a button doesn't work.

I've made everything descriped in a tutorial and the app works. But I don't get why only the one without button works...

Here is a screenshot: Working vs nonworking progressbar

And here I've uploaded my eclipse projects, the one with working progressbar and the one with a button in the app which should open the webview: click

It would be very nice if someone could point me in the right direction.

Thank you in advance.

Was it helpful?

Solution

The incorrect code is in your AndroidManifest.xml.

<activity
        android:name=".WebViewActivity"
        android:theme="@android:style/Theme.NoTitleBar" />

You specified the theme without the title bar so you will not see the loading bar either. Just remove the theme attribute:

<activity android:name=".WebViewActivity" />

Also you have strange combination of the sdk version in the manifest and the sdk version of your build target. Change it from 10 to 8, because the build target of your project is Android 2.2 (API8)

<uses-sdk android:minSdkVersion="8" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top