Android - Using Fragments
I'm very new to Java, and Android development. I want to be able to
display a local page page within my App using the fragments (because I
don't want the entire app to be web based).
So, I've gone into my arview.xml and added a fragment:
<fragment
android:id="@+id/fragment_bbc"
android:name="android.webkit.WebViewFragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" />
Now, I want to place a web page in there (for now, I'll just use the bbc
website).
Within my 'onCreate(Bundle savedInstanceState)' I have this:
webFrag = (WebViewFragment) mGUIView.findViewById(R.id.fragment_bbc);
mWebView = (WebView) mGUIView.findViewById(R.id.fragment_bbc);
myWebView.loadUrl("http://www.bbc.co.uk");
I have errors of all 3 of those lines, all saying they can't be resolved.
Where am I going wrong? Thanks
No comments:
Post a Comment