<?xml version= "1.0" encoding= "Utf-8"?>
<linearlayout xmlns:android= "Http://schemas.android.com/apk/res/android"
Xmlns:tools= "Http://schemas.android.com/tools"
Android:id= "@+id/container"
Android:layout_width= "Match_parent"
android:layout_height= "Match_parent"
android:orientation= "Vertical" >
<!--Header Page--
<linearlayout
Android:id= "@+id/mian_header"
Android:layout_width= "Match_parent"
android:layout_height= "90dip"
android:background= "@color/main_header_bg_new"
android:orientation= "Vertical"/>
<!--Body Page--
<linearlayout
Android:id= "@+id/mian_body"
Android:layout_width= "Match_parent"
android:layout_height= "0dip"
android:layout_weight= "1"
android:background= "@color/main_body_bg_new"
android:orientation= "Vertical"/>
</LinearLayout>
Activity and WebView
1. First define a UI activity (containing the WebView region).
2.UI activity Java code to define the WebView area of the replacement code, replace the template code with WebView (similar to the addition of the Div, the div container itself does not have the content, just the role of the position), to achieve the fallback function (not shown, ugly AH).
Fragmenttransaction ft = manager.begintransaction ();
Xxxxx
Xxxxx
Xxxxx
Ft.commit (do not forget the commit, whether the person has no effect);
3. Perform related operations in WebView (this is extended separately, not in detail).
4. In the other display section of the UI, click the blank fallback function or click the home fallback feature.
5. Beware of unusual captures, handling, and friendly hints.
String Carnumber = arraydata[0].substring (Arraydata[0].lastindexof (",") + 1). Trim ();
Fragmenttransaction ft = manager.begintransaction ();
Ft.replace (R.id.mian_body, Webfragment, "webviewfragment");
Bundle bundle = new bundle ();
Bundle.putstring (Ovalconstant.tag_model_key, Ovalconstant.tag_customer_value);
Bundle.putstring (Ovalconstant.shared_plateno_zh_key, Bodysearchtextview.gettext (). toString ());
if (" -999". Equals (Arraydata[3].trim ())) {
Bundle.putstring (Ovalconstant.tag_params_key, "plateno=" + carnumber);
} else {
Bundle.putstring (Ovalconstant.tag_params_key, "plateno=" + carnumber + "&customercode=" + ArrayData[3].trim ());//
Combination of androidactivity and WebView