.xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/bg1" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/timerset_titlebar" >
<Button
android:id="@+id/faq_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/back_selector"
android:layout_alignParentLeft="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="20dip"
android:text="FAQ"
/>
</RelativeLayout>
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/web_faq"/>
</LinearLayout>
.activity文件
faqBack = (Button) findViewById(R.id.faq_back);
faqWeb = (WebView) findViewById(R.id.web_faq);
faqWeb.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
faqBack.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
startUp();
tab_host.setCurrentTab(2);
more_page();
}
});
faqWeb.loadUrl(url);