唐诗宋词具体软件(源码讲解)
下载地址:http://static.apk.hiapk.com/html/2012/05/593136.html
-----------------主ACTIVITY
package tangshi.co.cc;
import net.miidi.credit.MiidiCredit;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInte易做图ce;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
public class HahamxActivity extends Activity {
private WebView webView;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
MiidiCredit
.init(HahamxActivity.this, "4573", "h3mj1k5b5lwopknk", false);
setContentView(R.layout.main);
// webView = (WebView) findViewById(R.id.webview1);
// ProxyBridge pBridge = new ProxyBridge();
// webView.addJavascriptInte易做图ce(pBridge, "AliansBridge");
// WebSettings wSet = webView.getSettings();
// wSet.setJavaScriptEnabled(true);
// webView.loadUrl("file:///android_asset/naojing.htm");
// TextView mTextView=(TextView)findViewById(R.id.webview1);
WebView mWebView = (WebView) findViewById(R.id.webview1);
mWebView.getSettings().setBuiltInZoomControls(true);
mWebView.loadUrl("file:///android_asset/index.htm");
}
protected void dialog() {
AlertDialog.Builder builder = new Builder(HahamxActivity.this);
builder.setTitle("唐诗宋词元曲");
builder.setMessage("你真的要退出唐诗宋词元曲吗?");
builder.setPositiveButton("否",
new android.content.DialogInte易做图ce.OnClickListener() {
@Override
public void onClick(DialogInte易做图ce dialog, int which) {
dialog.dismiss();
}
});
builder.setNegativeButton("是",
new android.content.DialogInte易做图ce.OnClickListener() {
@Override
public void onClick(DialogInte易做图ce dialog, int which) {
dialog.dismiss();
android.os.Process.killProcess(android.os.Process
.myPid());
}
});
builder.create().show();
}
public void onBackPressed() {
dialog();
}
public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub
SubMenu subMenu2 = menu.addSubMenu(0, 2, 0, "唐诗三百首");
SubMenu subMenu3 = menu.addSubMenu(0, 3, 0, "宋词");
SubMenu subMenu4 = menu.addSubMenu(0, 4, 0, "元曲");
// SubMenu subMenu5 = menu.addSubMenu(0, 5, 0, "英文谚语");
SubMenu subMenu = menu.addSubMenu(0, 6, 0, "软件简介");
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// TODO Auto-generated method stub
switch (item.getItemId()) {
case 6:
AlertDialog.Builder builder = new Builder(HahamxActivity.this);
builder.setTitle("唐诗宋词元曲!");
builder.setMessage(R.string.about);
builder.setPositiveButton("确定",
new DialogInte易做图ce.OnClickListener() {
@Override
public void onClick(DialogInte易做图ce dialog, int which) {
&nb
补充:移动开发 , Android ,