IndexViewer.java :  » UnTagged » ampthy » com » qb » activity » viewer » Android Open Source

Android Open Source » UnTagged » ampthy 
ampthy » com » qb » activity » viewer » IndexViewer.java
package com.qb.activity.viewer;

import com.qb.R;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebView;
import android.widget.Toast;

public class IndexViewer extends Activity{

  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.newsviewer);
    
    WebView wView = (WebView)findViewById(R.id.wvNews);
    
    wView.getSettings().setJavaScriptEnabled(true);
    wView.addJavascriptInterface(this, "javatojs");
    
    wView.loadUrl("file:///android_asset/index.html");
  }
  
  public void login(String name,String passwd){
    
    Toast.makeText(this, name + "   " + passwd, 5000).show();
  }
  
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.