Permalink
Browse files

Merge branch 'zhanger'

  • Loading branch information...
2 parents a26a5c8 + cc417f0 commit b48bd326985cecc7af06397c24bd377debc741e2 @zhanger committed Mar 12, 2012
Showing with 81 additions and 5 deletions.
  1. +4 −2 AndroidManifest.xml
  2. +9 −3 README
  3. +15 −0 res/layout/welcome.xml
  4. +25 −0 src/com/zhangabc/AppClass.java
  5. +28 −0 src/com/zhangabc/WelcomeActivity.java
View
@@ -3,11 +3,13 @@
package="com.zhangabc"
android:versionCode="1"
android:versionName="1.0" >
-
+ <uses-sdk android:minSdkVersion="10" />
+ <uses-permission android:name="android.permission.INTERNET" />
<application android:label="@string/app_name" >
<activity
android:name="WelcomeActivity"
- android:label="@string/app_name" >
+ android:label="@string/app_name"
+ android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
View
12 README
@@ -1,5 +1,9 @@
+## vi project.properties :
+
+
+
## vi .gitignore and add:
bin/*
@@ -21,7 +25,9 @@
## BUILD & DEBUG PROJECT
- ant debug
- adb uninstall com.zhangabc.kindlefireMarket
- adb -s emulator-5554 install bin/xxxx.apk
+adb uninstall com.zhangabc
+rm -rf bin/*
+ant debug
+adb -s emulator-5554 install bin/WelcomeActivity-debug.apk
+adb shell "am start -n com.zhangabc/com.zhangabc.WelcomeActivity"
View
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <Button
+ android:id="@+id/btnInto"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_marginLeft="450dp"
+ android:text="进入市场" />
+
+</RelativeLayout>
@@ -0,0 +1,25 @@
+package com.zhangabc;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+public class AppClass {
+
+ public static String[] getClassByParentName(String name){
+
+ HashMap<String, String[]> info = new HashMap();
+ info.put( "游戏", new String[]{"休闲","益智","角色扮演","战略","动作","射击","经营","养成","冒险","网游","棋牌","模拟器","体育"});
+ info.put( "应用", new String[]{"浏览","娱乐","社交","实用","办公","系统","其他"});
+ info.put( "装机必备", new String[]{"浏览","娱乐","社交","实用","办公","系统","其他"});
+
+ String[] result = (String[])info.get(name);
+ if( result == null) {
+ return null;
+
+ }
+ //String name = (String)person.get( "name ");
+
+ return result;
+ }
+}
@@ -1,7 +1,17 @@
package com.zhangabc;
+import com.zhangabc.KindleActivity;
+import com.zhangabc.R;
+import com.zhangabc.WelcomeActivity;
+
import android.app.Activity;
+import android.content.Intent;
import android.os.Bundle;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.View.OnClickListener;
+import android.widget.Button;
public class WelcomeActivity extends Activity
{
@@ -11,5 +21,23 @@ public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
+
+ getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+ WindowManager.LayoutParams.FLAG_FULLSCREEN);
+
+ //requestWindowFeature(Window.FEATURE_NO_TITLE);
+ setContentView(R.layout.welcome);
+ setTitle("92kindle电子市场");
+ Button btnWel = (Button) findViewById(R.id.btnInto);
+ btnWel.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // TODO Auto-generated method stub
+ Intent intent = new Intent();
+ intent.setClass(WelcomeActivity.this, KindleActivity.class);
+ startActivity(intent);
+ WelcomeActivity.this.finish();
+ }
+ });
}
}

0 comments on commit b48bd32

Please sign in to comment.