package com.myqsc.mobile2; import android.os.Bundle; import android.view.KeyEvent; import android.webkit.WebSettings; import android.webkit.WebView; import com.umeng.analytics.MobclickAgent; import me.imid.swipebacklayout.lib.app.SwipeBackActivity; public class AboutUsActivity extends SwipeBackActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about_us); WebView webView = (WebView) findViewById(R.id.about_us_text); webView.setHorizontalScrollBarEnabled(false); webView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN); webView.loadUrl("file:///android_asset/aboutus.html"); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK){ scrollToFinishActivity(); return true; } return false; } @Override protected void onPause() { super.onPause(); MobclickAgent.onPause(this); } @Override protected void onResume() { super.onResume(); MobclickAgent.onResume(this); } @Override protected void onStop() { super.onStop(); } @Override protected void onStart() { super.onStart(); } }