Android Open Source - BungalowAndroidApp Web Activity






From Project

Back to project page BungalowAndroidApp.

License

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.app.Activity;
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;
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_web);
    this.webView = (WebView)findViewById(R.id.webView);
    
  }
  
  public void loadUrl(String url) {
    this.webView.loadUrl(url);
  }

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

  @Override
  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 == R.id.action_settings) {
      return true;
    }
    return super.onOptionsItemSelected(item);
  }
}




Java Source Code List

se.aleros.bungalow.BungalowMapFragment.java
se.aleros.bungalow.Bungalow.java
se.aleros.bungalow.MainActivity.java
se.aleros.bungalow.NavigationDrawerFragment.java
se.aleros.bungalow.Place.java
se.aleros.bungalow.RSSAdapter.java
se.aleros.bungalow.RSSDownloadCompleteHandler.java
se.aleros.bungalow.RSSFeed.java
se.aleros.bungalow.RSSItemActivity.java
se.aleros.bungalow.RSSItem.java
se.aleros.bungalow.RSSListFragment.java
se.aleros.bungalow.RssMonitorService.java
se.aleros.bungalow.WebActivity.java