/*
* Copyright (c) 2014. Marshal Chen.
*/
package com.marshalchen.common.demoofui.fadingactionbar;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.marshalchen.common.demoofui.R;
import com.marshalchen.common.uimodule.fadingactionbar.FadingActionBarHelper;
public class WebViewActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FadingActionBarHelper helper = new FadingActionBarHelper()
.actionBarBackground(R.drawable.fading_actionbar_ab_background)
.headerLayout(R.layout.fading_actionbar_header)
.contentLayout(R.layout.fading_actionbar_activity_webview);
setContentView(helper.createView(this));
helper.initActionBar(this);
WebView webView = (WebView) findViewById(R.id.webView);
webView.setWebViewClient(new WebViewClient());
webView.loadUrl("http://en.wikipedia.org/wiki/New_York_City");
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.fading_actionbar_activity_menu, menu);
return true;
}
}