Android Open Source - BungalowAndroidApp Web Activity

From Project

Back to project page BungalowAndroidApp.


The source code is released under:

MIT License

If you think the Android project BungalowAndroidApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package se.aleros.bungalow;
/* w ww  . j av  a2  s. c  om*/
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;

 * A generic Activity subclass for dealing with web views
 * @author alecca
public class WebActivity extends Activity {
  private WebView webView;
   * Returns the web view for the activity
   * @return
  public WebView getWebView() {
    return this.webView;
  protected void onCreate(Bundle savedInstanceState) {
    this.webView = (WebView)findViewById(;
  public void loadUrl(String url) {

  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(, menu);
    return true;

  public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == {
      return true;
    return super.onOptionsItemSelected(item);

Java Source Code List