I'm going to be taking a data structures course in about a month and I'll be using Java. Since I'm new to Android dev. I plan to use Android and its WebKit features and create hybrid apps for all class assignments.
Chap.16 is what I really need to know so I loaded the example code into Eclipse and found a couple of problems...
(1) Class WebTutorial,
browser = (WebView) findViewById(R.id.browser);
id.browser was missing from the app's layout file:
<WebView android:id="@+id/browser"
> android:layout_width="fill_parent"
android:layout_height="wrap_content">
</WebView>
(2) Run this app in the Android v2.3 emulator and the Info button's toast command doesn't work:
Toast.makeText(context,s,Toast.LENGTH_LONG).show();
I wasted some time trying to get this to work and later found it's an Android 2.3 emulator problem:
http://stackoverflow.com/questions/4459458/phonegap-js-crashes-android-app
Running it in v2.2 does work, I guess, but the output of the toast isn't to the status bar but more like the Chrome button's alert output.
|