Android Open Source - govchecker O A Web View






From Project

Back to project page govchecker.

License

The source code is released under:

GNU General Public License

If you think the Android project govchecker 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 com.govchecker;
//  www . j  a  v a2  s . c o  m
import com.govchecker.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.webkit.WebView;
import android.widget.ShareActionProvider;

public class OAWebView extends Activity{
  
  private WebView wv;
  private ShareActionProvider mShareActionProvider;
  
  public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.webview);
    wv = (WebView) findViewById(R.id.WebView);
    
    Bundle extras = getIntent().getExtras();
    Log.d("fin_url", extras.getString("finurl"));
    
    wv.loadUrl(extras.getString("finurl"));
  }
  
  public boolean onCreateOptionsMenu(Menu menu){
    getMenuInflater().inflate(R.menu.menu_webview, menu);
    
    mShareActionProvider = (ShareActionProvider) menu.findItem(R.id.share).getActionProvider();
    
    mShareActionProvider.setShareIntent(getDefaultShareIntent());
    
    return super.onCreateOptionsMenu(menu);  
  }
  
  private Intent getDefaultShareIntent(){
    Intent intent = new Intent(Intent.ACTION_SEND);
    intent.setType("text/plain");
    intent.putExtra(Intent.EXTRA_TEXT, wv.getUrl().toString());
    return intent;
  }

}




Java Source Code List

com.govchecker.HansardSearchDisplay.java
com.govchecker.HansardSearch.java
com.govchecker.OAWebView.java
com.govchecker.OpenAusDB.java
com.govchecker.OpenAusSearchDroid.java
com.govchecker.RepSearch.java
com.govchecker.Rep_Display.java
com.govchecker.Rep_Object.java
com.govchecker.SearchHansardActivity.java
com.govchecker.SearchRepsActivity.java
com.govchecker.SearchSenate.java
com.govchecker.Utilities.java
com.govchecker.VoteResultDisplay.java