Android Open Source - AndroidPageKiteApp Help Viewer






From Project

Back to project page AndroidPageKiteApp.

License

The source code is released under:

GNU General Public License

If you think the Android project AndroidPageKiteApp 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 net.pagekite.app;
/*from  w w  w . j a va 2s  .  c o m*/
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;

public class HelpViewer extends Activity {

    public static final String INTENT_HELP_PAGE = "net.pagekite.app.helpPage";
    public static final String HELP_ABOUT = "about.html";

    private static final String SI_LAST_VIEW = "lastHelpView";
    private String mViewing;
    private WebView mWebView;
  
  @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.helpviewer);

        Intent i = getIntent();
        mViewing = i.getStringExtra(INTENT_HELP_PAGE);
        if (mViewing == null) mViewing = HELP_ABOUT;

        mWebView = (WebView) findViewById(R.id.helpWebView);
        mWebView.setSaveEnabled(true);
        mWebView.getSettings().setJavaScriptEnabled(false);

        if (savedInstanceState != null)
          mViewing = savedInstanceState.getString(SI_LAST_VIEW);
            
        loadHelp(mViewing);
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
      outState.putString(SI_LAST_VIEW, mViewing);
    }
    
    private void loadHelp(String page) {
        if (page != null) mViewing = page;
        mWebView.loadUrl("file:///android_asset/help/"+mViewing);
    }
}




Java Source Code List

net.pagekite.app.BootHandler.java
net.pagekite.app.HelpViewer.java
net.pagekite.app.LogViewer.java
net.pagekite.app.Preferences.java
net.pagekite.app.Service.java
org.xmlrpc.android.Base64Coder.java
org.xmlrpc.android.IXMLRPCSerializer.java
org.xmlrpc.android.MethodCall.java
org.xmlrpc.android.Tag.java
org.xmlrpc.android.XMLRPCClient.java
org.xmlrpc.android.XMLRPCCommon.java
org.xmlrpc.android.XMLRPCException.java
org.xmlrpc.android.XMLRPCFault.java
org.xmlrpc.android.XMLRPCSerializable.java
org.xmlrpc.android.XMLRPCSerializer.java
org.xmlrpc.android.XMLRPCServer.java