: Http://static.apk.hiapk.com/html/2012/05/593136.html
----------------- Main 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. DialogInterface;
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. addJavascriptInterface (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 ("Tang Shi Song Ci Yuanqu ");
Builder. setMessage ("are you sure you want to exit the Tang poetry and Song Dynasty Yuanqu? ");
Builder. setPositiveButton ("no ",
New android. content. DialogInterface. OnClickListener (){
@ Override
Public void onClick (DialogInterface dialog, int which ){
Dialog. dismiss ();
}
});
Builder. setNegativeButton ("yes ",
New android. content. DialogInterface. OnClickListener (){
@ Override
Public void onClick (DialogInterface 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, "Tang poetry three hundred ");
SubMenu subMenu3 = menu. addSubMenu (0, 3, 0, "");
SubMenu subMenu4 = menu. addSubMenu (0, 4, 0, "Yuanqu ");
// SubMenu subMenu5 = menu. addSubMenu (0, 5, 0, "slang ");
SubMenu subMenu = menu. addSubMenu (0, 6, 0, "Software Overview ");
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 ("Tang Shi and Song Ci Yuanqu! ");
Builder. setMessage (R. string. about );
Builder. setPositiveButton ("OK ",
New DialogInterface. OnClickListener (){
@ Override
Public void onClick (DialogInterface dialog, int which ){
// TODO Auto-generated method stub
}
});
Builder. create (). show ();
Break;
Case 3:
Intent intent = new Intent (HahamxActivity. this, xiao1_3.class );
StartActivity (intent );
Break;
Case 2:
Intent intent1 = new Intent (HahamxActivity. this, xiaohua. class );
StartActivity (intent1 );
Break;
Case 4:
Intent intent4 = new Intent (HahamxActivity. this, chunjie. class );
StartActivity (intent4 );
Break;
// Case 5:
// Intent intent5 = new Intent (HahamxActivity. this, yanyu. class );
// StartActivity (intent5 );
// Break;
Default:
Break;
}
Return super. onOptionsItemSelected (item );
}
Public class ProxyBridge {
Public int one (){
Return 1;
}
}
}
--------------------- The following ACTIVITY is similar to creating
Package tangshi. co. cc;
Import tangshi. co. cc. R;
Import android. app. Activity;
Import android. OS. Bundle;
Import android. webkit. WebView;
Public class chunjie extends Activity {
@ Override
Protected void onCreate (Bundle savedInstanceState ){
// TODO Auto-generated method stub
Super. onCreate (savedInstanceState );
SetContentView (R. layout. main4 );
WebView mWebView4 = (WebView) findViewById (R. id. webview4 );
MWebView4.loadUrl ("file: // android_asset/index4.htm ");
MWebView4.getSettings (). setBuiltInZoomControls (true );
}
}
-------------- Splash Animation
Package tangshi. co. cc;
Import android. app. Activity;
Import android. content. Intent;
Import android. OS. Bundle;
Import android. OS. Handler;
Public class Splash extends Activity {
@ Override
Protected void onCreate (Bundle savedInstanceState)
{
// TODO Auto-generated method stub
Super. onCreate (savedInstanceState );
SetContentView (R. layout. splash );
New Handler (). postDelayed (new Runnable ()
{
@ Override
Public void run ()
{
// TODO Auto-generated method stub
Intent it = new Intent (Splash. this, HahamxActivity. class );
StartActivity (it );
Finish ();
}
},3000 );
}
}
---------------- Main. xml Layout
<? Xml version = "1.0" encoding = "UTF-8"?>
<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android"
Xmlns: umadsdk = "http://schemas.android.com/apk/res/tangshi.co.cc"
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
Android: orientation = "vertical">
<LinearLayout
Xmlns: umadsdk = "http://schemas.android.com/apk/res/tangshi.co.cc"
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Android: layout_marginTop = "20px"
Android: orientation = "vertical">
<Net. miidi. credit. AdView
Android: id = "@ + id/adView"
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
Umadsdk: backgroundColor = "# 4076AA"
Umadsdk: backgroundTransparent = "255"
Umadsdk: textColor = "# ffffff">
</Net. miidi. credit. AdView>
</LinearLayout>
<LinearLayout
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content"
Android: background = "# FFFFFF"
Android: orientation = "vertical">
<ImageView
Android: id = "@ + id/imageView1"
Android: layout_width = "300px"
Android: layout_height = "180px"
Android: layout_gravity = "center"
Android: src = "@ drawable/icon1">
</ImageView>
<WebView
Android: id = "@ + id/webview1"
Android: layout_width = "wrap_content"
Android: layout_height = "wrap_content">
</WebView>
</LinearLayout>
</LinearLayout>
------------------------
The applet is for your reference only. I wish you a pleasant learning experience!
From the column of gongzibai