Commit e0ca8afd8269474820197ecd72a08c2a9768837a
1 parent
2dc11c5615
Exists in
master
release1.0.0
Showing 34 changed files with 480 additions and 37 deletions Inline Diff
- InlandSDKDemo/AndroidManifest.xml
- InlandSDKDemo/project.properties
- InlandSDKDemo/src/com/gump/inland/sdk/demo/MainActivity.java
- InlandSDKRelease/AndroidManifest.xml
- InlandSDKRelease/libs/InlandSDK_v1.0.0_proguard.jar
- InlandSDKRelease/res/drawable-hdpi/bottom_light_bg.png
- InlandSDKRelease/res/drawable-hdpi/horizontal_line.png
- InlandSDKRelease/res/drawable-hdpi/ic_back_dark.png
- InlandSDKRelease/res/drawable-hdpi/ic_pwd.png
- InlandSDKRelease/res/drawable-hdpi/ic_user.png
- InlandSDKRelease/res/drawable-hdpi/loading.png
- InlandSDKRelease/res/drawable-hdpi/title_light_bg.png
- InlandSDKRelease/res/drawable-xhdpi/bottom_light_bg.png
- InlandSDKRelease/res/drawable-xhdpi/horizontal_line.png
- InlandSDKRelease/res/drawable-xhdpi/ic_back_dark.png
- InlandSDKRelease/res/drawable-xhdpi/ic_pwd.png
- InlandSDKRelease/res/drawable-xhdpi/ic_user.png
- InlandSDKRelease/res/drawable-xhdpi/loading.png
- InlandSDKRelease/res/drawable-xhdpi/title_light_bg.png
- InlandSDKRelease/res/drawable/btn_green_bg.xml
- InlandSDKRelease/res/drawable/btn_orange_bg.xml
- InlandSDKRelease/res/drawable/loading_progress.xml
- InlandSDKRelease/res/layout/fragment_container.xml
- InlandSDKRelease/res/layout/fragment_loging.xml
- InlandSDKRelease/res/layout/fragment_sign_choice.xml
- InlandSDKRelease/res/layout/fragment_signup.xml
- InlandSDKRelease/res/layout/login_container.xml
- InlandSDKRelease/res/layout/pay_container.xml
- InlandSDKRelease/res/layout/title.xml
- InlandSDKRelease/res/values-v11/styles.xml
- InlandSDKRelease/res/values-v14/styles.xml
- InlandSDKRelease/res/values/colors.xml
- InlandSDKRelease/res/values/strings.xml
- InlandSDKRelease/res/values/themes.xml
InlandSDKDemo/AndroidManifest.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
3 | package="com.ninjaonline" | 3 | package="com.ninjaonline" |
4 | android:versionCode="1" | 4 | android:versionCode="1" |
5 | android:versionName="1.0" > | 5 | android:versionName="1.0" > |
6 | 6 | ||
7 | <uses-sdk | 7 | <uses-sdk |
8 | android:minSdkVersion="10" | 8 | android:minSdkVersion="10" |
9 | android:targetSdkVersion="21" /> | 9 | android:targetSdkVersion="21" /> |
10 | 10 | ||
11 | <uses-permission android:name="android.permission.INTERNET" /> | 11 | <uses-permission android:name="android.permission.INTERNET" /> |
12 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | 12 | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
13 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | 13 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> |
14 | <uses-permission android:name="android.permission.BLUETOOTH" /> | 14 | <uses-permission android:name="android.permission.BLUETOOTH" /> |
15 | <uses-permission android:name="android.permission.GET_ACCOUNTS" /> | 15 | <uses-permission android:name="android.permission.GET_ACCOUNTS" /> |
16 | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> | 16 | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> |
17 | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | 17 | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
18 | <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> | 18 | <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> |
19 | <uses-permission android:name="android.permission.WRITE_SETTINGS" /> | 19 | <uses-permission android:name="android.permission.WRITE_SETTINGS" /> |
20 | <!-- 以下是银联支付专用 --> | 20 | <!-- 以下是银联支付专用 --> |
21 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> | 21 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> |
22 | 22 | ||
23 | 23 | ||
24 | <application | 24 | <application |
25 | android:allowBackup="true" | 25 | android:allowBackup="true" |
26 | android:icon="@drawable/ic_launcher" | 26 | android:icon="@drawable/ic_launcher" |
27 | android:label="@string/app_name" > | 27 | android:label="@string/app_name" > |
28 | <activity | 28 | <activity |
29 | android:name="com.gump.inland.sdk.demo.MainActivity" | 29 | android:name="com.gump.inland.sdk.demo.MainActivity" |
30 | android:label="@string/app_name" > | 30 | android:label="@string/app_name" > |
31 | <intent-filter> | 31 | <intent-filter> |
32 | <action android:name="android.intent.action.MAIN" /> | 32 | <action android:name="android.intent.action.MAIN" /> |
33 | 33 | ||
34 | <category android:name="android.intent.category.LAUNCHER" /> | 34 | <category android:name="android.intent.category.LAUNCHER" /> |
35 | </intent-filter> | 35 | </intent-filter> |
36 | <intent-filter> | 36 | <intent-filter> |
37 | <action android:name="android.intent.action.VIEW" /> | 37 | <action android:name="android.intent.action.VIEW" /> |
38 | 38 | ||
39 | <category android:name="android.intent.category.DEFAULT" /> | 39 | <category android:name="android.intent.category.DEFAULT" /> |
40 | 40 | ||
41 | <data android:scheme="wxdb562d299ac311e0" /> | 41 | <data android:scheme="wxdb562d299ac311e0" /> |
42 | </intent-filter> | 42 | </intent-filter> |
43 | </activity> | 43 | </activity> |
44 | <activity | 44 | <activity |
45 | android:name="com.gump.inland.gamesdk.PassportBaseActivity" | 45 | android:name="com.gump.inland.gamesdk.PassportBaseActivity" |
46 | android:theme="@style/Theme.TransparentWin" > | 46 | android:theme="@style/Theme.TransparentWin" > |
47 | </activity> | 47 | </activity> |
48 | <activity | ||
49 | android:name="com.gump.inland.gamesdk.PaymentActivity" | ||
50 | android:theme="@android:style/Theme.Light.NoTitleBar" > | ||
51 | </activity> | ||
52 | <!-- wx callback --> | 48 | <!-- wx callback --> |
53 | <activity | 49 | <activity |
54 | android:name="com.ninjaonline.wxapi.WXPayEntryActivity" | 50 | android:name="com.ninjaonline.wxapi.WXPayEntryActivity" |
55 | android:exported="true" > | 51 | android:exported="true" > |
56 | </activity> | 52 | </activity> |
57 | <!-- unionPay --> | 53 | <!-- unionPay --> |
58 | <activity | 54 | <activity |
59 | android:name="com.unionpay.uppay.PayActivity" | 55 | android:name="com.unionpay.uppay.PayActivity" |
60 | android:configChanges="orientation|keyboardHidden" | 56 | android:configChanges="orientation|keyboardHidden" |
61 | android:excludeFromRecents="true" | 57 | android:excludeFromRecents="true" |
62 | android:label="@string/app_name" | 58 | android:label="@string/app_name" |
63 | android:screenOrientation="portrait" | 59 | android:screenOrientation="portrait" |
64 | android:windowSoftInputMode="adjustResize" /> | 60 | android:windowSoftInputMode="adjustResize" /> |
65 | </application> | 61 | </application> |
66 | 62 | ||
67 | </manifest> | 63 | </manifest> |
InlandSDKDemo/project.properties
1 | # This file is automatically generated by Android Tools. | 1 | # This file is automatically generated by Android Tools. |
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! | 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! |
3 | # | 3 | # |
4 | # This file must be checked in Version Control Systems. | 4 | # This file must be checked in Version Control Systems. |
5 | # | 5 | # |
6 | # To customize properties used by the Ant build system edit | 6 | # To customize properties used by the Ant build system edit |
7 | # "ant.properties", and override values to adapt the script to your | 7 | # "ant.properties", and override values to adapt the script to your |
8 | # project structure. | 8 | # project structure. |
9 | # | 9 | # |
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): | 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): |
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt | 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt |
12 | 12 | ||
13 | # Project target. | 13 | # Project target. |
14 | target=android-22 | 14 | target=android-22 |
15 | android.library.reference.1=../../../InlandSDK/InlandSDK | 15 | android.library.reference.1=../InlandSDKRelease |
16 | 16 |
InlandSDKDemo/src/com/gump/inland/sdk/demo/MainActivity.java
1 | package com.gump.inland.sdk.demo; | 1 | package com.gump.inland.sdk.demo; |
2 | 2 | ||
3 | import android.app.Activity; | 3 | import android.app.Activity; |
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.os.Bundle; | 5 | import android.os.Bundle; |
6 | import android.util.Log; | 6 | import android.util.Log; |
7 | import android.view.View; | 7 | import android.view.View; |
8 | import android.widget.Button; | 8 | import android.widget.Button; |
9 | import android.widget.TextView; | 9 | import android.widget.TextView; |
10 | 10 | ||
11 | import com.gump.inland.gamesdk.InlandSDK; | 11 | import com.gump.inland.gamesdk.InlandSDK; |
12 | import com.gump.inland.gamesdk.InlandSDKCallback; | 12 | import com.gump.inland.gamesdk.InlandSDKCallback; |
13 | import com.gump.inland.gamesdk.InlandSDKException; | 13 | import com.gump.inland.gamesdk.InlandSDKException; |
14 | import com.gump.inland.gamesdk.bean.GumpUser; | 14 | import com.gump.inland.gamesdk.bean.GumpUser; |
15 | import com.gump.inland.gamesdk.bean.PayRequest; | 15 | import com.gump.inland.gamesdk.bean.PayRequest; |
16 | import com.gump.inland.gamesdk.callback.PurchaseCallback; | 16 | import com.gump.inland.gamesdk.callback.PurchaseCallback; |
17 | import com.gump.inland.gamesdk.passport.Passport; | 17 | import com.gump.inland.gamesdk.passport.Passport; |
18 | import com.gump.inland.gamesdk.utils.Logger; | ||
19 | import com.ninjaonline.R; | 18 | import com.ninjaonline.R; |
20 | 19 | ||
21 | public class MainActivity extends Activity { | 20 | public class MainActivity extends Activity { |
22 | 21 | ||
23 | private static final String TAG = "MainActivity"; | 22 | private static final String TAG = "MainActivity"; |
24 | private TextView tvSDKInfo; | 23 | private TextView tvSDKInfo; |
25 | private TextView tvUserInfo; | 24 | private TextView tvUserInfo; |
26 | private TextView tvPurchaseResult; | 25 | private TextView tvPurchaseResult; |
27 | private Button btnLogin; | 26 | private Button btnLogin; |
28 | private Button btnPay; | 27 | private Button btnPay; |
29 | 28 | ||
30 | @Override | 29 | @Override |
31 | protected void onCreate(Bundle savedInstanceState) { | 30 | protected void onCreate(Bundle savedInstanceState) { |
32 | super.onCreate(savedInstanceState); | 31 | super.onCreate(savedInstanceState); |
33 | setContentView(R.layout.activity_main); | 32 | setContentView(R.layout.activity_main); |
34 | tvSDKInfo = (TextView) findViewById(R.id.sdk_info); | 33 | tvSDKInfo = (TextView) findViewById(R.id.sdk_info); |
35 | tvUserInfo = (TextView) findViewById(R.id.user_info); | 34 | tvUserInfo = (TextView) findViewById(R.id.user_info); |
36 | tvPurchaseResult = (TextView) findViewById(R.id.purchase_result); | 35 | tvPurchaseResult = (TextView) findViewById(R.id.purchase_result); |
37 | btnLogin = (Button) findViewById(R.id.login); | 36 | btnLogin = (Button) findViewById(R.id.login); |
38 | btnPay = (Button) findViewById(R.id.purchase); | 37 | btnPay = (Button) findViewById(R.id.purchase); |
39 | 38 | ||
40 | Log.d(TAG, "MainActivity onCreate"); | 39 | Log.d(TAG, "MainActivity onCreate"); |
41 | InlandSDK.setIsDebugEnable(true); | 40 | InlandSDK.setIsDebugEnable(true); |
42 | InlandSDK.setScreenLandscape(false); | 41 | InlandSDK.setScreenLandscape(false); |
43 | InlandSDK.initializeSDK("10000", "dkfjgljdlgjldjgl","1001"); | 42 | InlandSDK.initializeSDK("10000", "dkfjgljdlgjldjgl","1001"); |
44 | Passport.getInstance().registerCallback(new InlandSDKCallback<GumpUser>() { | 43 | Passport.getInstance().registerCallback(new InlandSDKCallback<GumpUser>() { |
45 | 44 | ||
46 | @Override | 45 | @Override |
47 | public void onSuccess(GumpUser result) { | 46 | public void onSuccess(GumpUser result) { |
48 | Logger.d(TAG, "gumpUser:" + result.toString()); | 47 | Log.d(TAG, "gumpUser:" + result.toString()); |
49 | btnLogin.setVisibility(View.GONE); | 48 | btnLogin.setVisibility(View.GONE); |
50 | tvUserInfo.setText(formatUserInfo(result)); | 49 | tvUserInfo.setText(formatUserInfo(result)); |
51 | btnPay.setVisibility(View.VISIBLE); | 50 | btnPay.setVisibility(View.VISIBLE); |
52 | } | 51 | } |
53 | 52 | ||
54 | @Override | 53 | @Override |
55 | public void onError(InlandSDKException error) { | 54 | public void onError(InlandSDKException error) { |
56 | Logger.d(TAG, "login error:" + error.getMessage()); | 55 | Log.d(TAG, "login error:" + error.getMessage()); |
57 | } | 56 | } |
58 | 57 | ||
59 | @Override | 58 | @Override |
60 | public void onCancel() { | 59 | public void onCancel() { |
61 | Logger.d(TAG, "login be canceled"); | 60 | Log.d(TAG, "login be canceled"); |
62 | } | 61 | } |
63 | }); | 62 | }); |
64 | 63 | ||
65 | tvSDKInfo.setText(getSDKInfo()); | 64 | tvSDKInfo.setText(getSDKInfo()); |
66 | btnLogin.setOnClickListener(new View.OnClickListener() { | 65 | btnLogin.setOnClickListener(new View.OnClickListener() { |
67 | 66 | ||
68 | @Override | 67 | @Override |
69 | public void onClick(View v) { | 68 | public void onClick(View v) { |
70 | Passport.getInstance().login(MainActivity.this); | 69 | Passport.getInstance().login(MainActivity.this); |
71 | } | 70 | } |
72 | }); | 71 | }); |
73 | btnPay.setOnClickListener(new View.OnClickListener() { | 72 | btnPay.setOnClickListener(new View.OnClickListener() { |
74 | 73 | ||
75 | @Override | 74 | @Override |
76 | public void onClick(View v) { | 75 | public void onClick(View v) { |
77 | PayRequest payRequest = new PayRequest(); | 76 | PayRequest payRequest = new PayRequest(); |
78 | payRequest.setPrice(1); | 77 | payRequest.setPrice(1); |
79 | payRequest.setProduct("玄冥剑"); | 78 | payRequest.setProduct("玄冥剑"); |
80 | payRequest.setExtOrder("p100201508311730"); | 79 | payRequest.setExtOrder("p100201508311730"); |
81 | payRequest.setGumpUid(Passport.getInstance().getGumpUser().getUid()); | 80 | payRequest.setGumpUid(Passport.getInstance().getGumpUser().getUid()); |
82 | InlandSDK.purchase(MainActivity.this, payRequest, new PurchaseCallback() { | 81 | InlandSDK.purchase(MainActivity.this, payRequest, new PurchaseCallback() { |
83 | 82 | ||
84 | @Override | 83 | @Override |
85 | public void onPurchaseError(Exception e) { | 84 | public void onPurchaseError(Exception e) { |
86 | Logger.w(TAG, "purchase error:" + e.getMessage()); | 85 | Log.w(TAG, "purchase error:" + e.getMessage()); |
87 | tvPurchaseResult.setText("purchase occured an error:" + e.getMessage()); | 86 | tvPurchaseResult.setText("purchase occured an error:" + e.getMessage()); |
88 | } | 87 | } |
89 | 88 | ||
90 | @Override | 89 | @Override |
91 | public void onPurchaseSuccess(String gumpTransId, String extOrder) { | 90 | public void onPurchaseSuccess(String gumpTransId, String extOrder) { |
92 | Logger.d(TAG, "purchase success:" + gumpTransId + ",extorder:" + extOrder); | 91 | Log.d(TAG, "purchase success:" + gumpTransId + ",extorder:" + extOrder); |
93 | tvPurchaseResult.setText("purchase " + gumpTransId + " success,extorder:" + extOrder); | 92 | tvPurchaseResult.setText("purchase " + gumpTransId + " success,extorder:" + extOrder); |
94 | } | 93 | } |
95 | 94 | ||
96 | @Override | 95 | @Override |
97 | public void onPurchaseCanceled() { | 96 | public void onPurchaseCanceled() { |
98 | Logger.d(TAG, "purchase be canceled"); | 97 | Log.d(TAG, "purchase be canceled"); |
99 | tvPurchaseResult.setText("purchase be canceled"); | 98 | tvPurchaseResult.setText("purchase be canceled"); |
100 | } | 99 | } |
101 | }); | 100 | }); |
102 | } | 101 | } |
103 | }); | 102 | }); |
104 | } | 103 | } |
105 | 104 | ||
106 | @Override | 105 | @Override |
107 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { | 106 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
108 | if (!InlandSDK.onActivityResult(requestCode, resultCode, data)) | 107 | if (!InlandSDK.onActivityResult(requestCode, resultCode, data)) |
109 | super.onActivityResult(requestCode, resultCode, data); | 108 | super.onActivityResult(requestCode, resultCode, data); |
110 | } | 109 | } |
111 | 110 | ||
112 | private String getSDKInfo() { | 111 | private String getSDKInfo() { |
113 | StringBuilder str = new StringBuilder(); | 112 | StringBuilder str = new StringBuilder(); |
114 | str.append("SDK version:"); | 113 | str.append("SDK version:"); |
115 | str.append(InlandSDK.getVersion()); | 114 | str.append(InlandSDK.getVersion()); |
116 | str.append("\nappId:"); | 115 | str.append("\nappId:"); |
117 | str.append(InlandSDK.getAppId()); | 116 | str.append(InlandSDK.getAppId()); |
118 | str.append("\nappKey:"); | 117 | str.append("\nappKey:"); |
119 | str.append(InlandSDK.getAppKey()); | 118 | str.append(InlandSDK.getAppKey()); |
120 | return str.toString(); | 119 | return str.toString(); |
121 | } | 120 | } |
122 | 121 | ||
123 | private String formatUserInfo(GumpUser user) { | 122 | private String formatUserInfo(GumpUser user) { |
124 | StringBuilder str = new StringBuilder(); | 123 | StringBuilder str = new StringBuilder(); |
125 | str.append("Logined User information:\n"); | 124 | str.append("Logined User information:\n"); |
126 | str.append("userId:" + user.getUid()); | 125 | str.append("userId:" + user.getUid()); |
127 | str.append("\nacccountType:" + user.getAccountType()); | 126 | str.append("\nacccountType:" + user.getAccountType()); |
128 | str.append("\nsessionKey:" + user.getSessionKey()); | 127 | str.append("\nsessionKey:" + user.getSessionKey()); |
129 | return str.toString(); | 128 | return str.toString(); |
130 | } | 129 | } |
131 | } | 130 | } |
132 | 131 |
InlandSDKRelease/AndroidManifest.xml
1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
2 | package="com.gump.inland.gamesdk.release" | 2 | package="com.gump.inland.gamesdk.release" |
3 | android:versionCode="1" | 3 | android:versionCode="1" |
4 | android:versionName="1.0" > | 4 | android:versionName="1.0" > |
5 | 5 | ||
6 | <uses-sdk | 6 | <uses-sdk |
7 | android:minSdkVersion="8" | 7 | android:minSdkVersion="8" |
8 | android:targetSdkVersion="21" /> | 8 | android:targetSdkVersion="21" /> |
9 | 9 | ||
10 | <application | 10 | <application |
11 | android:allowBackup="true" | 11 | android:allowBackup="true" |
12 | android:icon="@drawable/ic_launcher" | 12 | android:icon="@drawable/ic_launcher" |
13 | android:label="@string/app_name" | ||
14 | android:theme="@style/AppTheme" > | 13 | android:theme="@style/AppTheme" > |
15 | </application> | 14 | </application> |
16 | 15 | ||
17 | </manifest> | 16 | </manifest> |
18 | 17 |
InlandSDKRelease/libs/InlandSDK_v1.0.0_proguard.jar
No preview for this file type
InlandSDKRelease/res/drawable-hdpi/bottom_light_bg.png
2.05 KB
InlandSDKRelease/res/drawable-hdpi/horizontal_line.png
1.59 KB
InlandSDKRelease/res/drawable-hdpi/ic_back_dark.png
1.17 KB
InlandSDKRelease/res/drawable-hdpi/ic_pwd.png
1.31 KB
InlandSDKRelease/res/drawable-hdpi/ic_user.png
1.39 KB
InlandSDKRelease/res/drawable-hdpi/loading.png
7.04 KB
InlandSDKRelease/res/drawable-hdpi/title_light_bg.png
2.02 KB
InlandSDKRelease/res/drawable-xhdpi/bottom_light_bg.png
2.42 KB
InlandSDKRelease/res/drawable-xhdpi/horizontal_line.png
1.75 KB
InlandSDKRelease/res/drawable-xhdpi/ic_back_dark.png
1.26 KB
InlandSDKRelease/res/drawable-xhdpi/ic_pwd.png
1.37 KB
InlandSDKRelease/res/drawable-xhdpi/ic_user.png
1.52 KB
InlandSDKRelease/res/drawable-xhdpi/loading.png
11.2 KB
InlandSDKRelease/res/drawable-xhdpi/title_light_bg.png
2.44 KB
InlandSDKRelease/res/drawable/btn_green_bg.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <selector xmlns:android="http://schemas.android.com/apk/res/android" > | ||
3 | <item android:state_pressed="true"> | ||
4 | <shape android:shape="rectangle"> | ||
5 | <corners android:radius="1.5dp" /> | ||
6 | |||
7 | <solid android:color="@color/btn_green_pressed" /> | ||
8 | |||
9 | <size android:height="30.5dp" /> | ||
10 | </shape></item> | ||
11 | <item> | ||
12 | <shape android:shape="rectangle"> | ||
13 | <corners android:radius="1.5dp" /> | ||
14 | |||
15 | <solid android:color="@color/btn_green_normal" /> | ||
16 | |||
17 | <size android:height="30.5dp" /> | ||
18 | </shape></item> | ||
19 | |||
20 | |||
21 | </selector> | ||
22 |
InlandSDKRelease/res/drawable/btn_orange_bg.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | |||
4 | <!-- <item android:state_pressed="true" android:drawable="@drawable/btn_orange_pressed"/> --> | ||
5 | <!-- <item android:drawable="@drawable/btn_orange_normal"/> --> | ||
6 | |||
7 | <item android:state_pressed="true"> | ||
8 | <shape android:shape="rectangle"> | ||
9 | <corners android:radius="1.5dp" /> | ||
10 | |||
11 | <solid android:color="@color/orange_pressed" /> | ||
12 | |||
13 | <size android:height="30.5dp" /> | ||
14 | </shape></item> | ||
15 | <item> | ||
16 | <shape android:shape="rectangle"> | ||
17 | <corners android:radius="1.5dp" /> | ||
18 | |||
19 | <solid android:color="@color/orange_normal" /> | ||
20 | |||
21 | <size android:height="30.5dp" /> | ||
22 | </shape></item> | ||
23 | |||
24 | </selector> |
InlandSDKRelease/res/drawable/loading_progress.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <rotate xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:drawable="@drawable/loading" | ||
4 | android:pivotX="50%" | ||
5 | android:pivotY="50%" | ||
6 | android:fromDegrees="0" | ||
7 | android:toDegrees="360" /> | ||
8 | |||
9 |
InlandSDKRelease/res/layout/fragment_container.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:layout_width="match_parent" | ||
4 | android:layout_height="wrap_content" | ||
5 | android:gravity="center" | ||
6 | android:orientation="vertical" > | ||
7 | |||
8 | <include layout="@layout/title" /> | ||
9 | |||
10 | <LinearLayout | ||
11 | android:id="@+id/container" | ||
12 | android:layout_width="match_parent" | ||
13 | android:layout_height="wrap_content" | ||
14 | android:orientation="vertical" > | ||
15 | </LinearLayout> | ||
16 | |||
17 | </LinearLayout> |
InlandSDKRelease/res/layout/fragment_loging.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:layout_width="wrap_content" | ||
4 | android:layout_height="wrap_content" | ||
5 | android:background="@color/white_translucent" | ||
6 | android:minWidth="293dp" | ||
7 | android:orientation="vertical" > | ||
8 | |||
9 | <RelativeLayout | ||
10 | android:layout_width="match_parent" | ||
11 | android:layout_height="36dp" > | ||
12 | |||
13 | <TextView | ||
14 | android:id="@+id/switch_user" | ||
15 | android:layout_width="wrap_content" | ||
16 | android:layout_height="wrap_content" | ||
17 | android:layout_alignParentRight="true" | ||
18 | android:layout_centerVertical="true" | ||
19 | android:layout_marginRight="17dp" | ||
20 | android:text="@string/switch_user" | ||
21 | android:textColor="@color/black_text" /> | ||
22 | |||
23 | <View | ||
24 | android:layout_width="fill_parent" | ||
25 | android:layout_height="1dp" | ||
26 | android:layout_alignParentBottom="true" | ||
27 | android:background="@color/light_gray" /> | ||
28 | </RelativeLayout> | ||
29 | |||
30 | <ProgressBar | ||
31 | android:layout_width="wrap_content" | ||
32 | android:layout_height="wrap_content" | ||
33 | android:layout_gravity="center" | ||
34 | android:layout_marginBottom="17dp" | ||
35 | android:layout_marginTop="23dp" | ||
36 | android:indeterminateBehavior="repeat" | ||
37 | android:indeterminateDrawable="@drawable/loading_progress" | ||
38 | android:indeterminateDuration="800" | ||
39 | android:indeterminateOnly="true" /> | ||
40 | |||
41 | <TextView | ||
42 | android:layout_width="wrap_content" | ||
43 | android:layout_height="wrap_content" | ||
44 | android:layout_gravity="center_horizontal" | ||
45 | android:layout_marginBottom="17dp" | ||
46 | android:text="@string/loging" | ||
47 | android:textColor="@color/black_text" /> | ||
48 | |||
49 | </LinearLayout> |
InlandSDKRelease/res/layout/fragment_sign_choice.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:layout_width="match_parent" | ||
4 | android:layout_height="wrap_content" | ||
5 | android:gravity="center" | ||
6 | android:orientation="vertical" > | ||
7 | |||
8 | <LinearLayout | ||
9 | android:layout_width="match_parent" | ||
10 | android:layout_height="wrap_content" | ||
11 | android:background="@color/white_translucent" | ||
12 | android:orientation="vertical" > | ||
13 | |||
14 | <LinearLayout | ||
15 | android:layout_width="match_parent" | ||
16 | android:layout_height="31dp" | ||
17 | android:layout_marginLeft="35dp" | ||
18 | android:layout_marginRight="35dp" | ||
19 | android:layout_marginTop="13dp" | ||
20 | android:background="@color/white" > | ||
21 | |||
22 | <ImageView | ||
23 | android:layout_width="wrap_content" | ||
24 | android:layout_height="wrap_content" | ||
25 | android:layout_gravity="center_vertical" | ||
26 | android:layout_marginLeft="9.5dp" | ||
27 | android:layout_marginRight="9.5dp" | ||
28 | android:src="@drawable/ic_user" /> | ||
29 | |||
30 | <View | ||
31 | android:layout_width="1dp" | ||
32 | android:layout_height="20dp" | ||
33 | android:layout_gravity="center_vertical" | ||
34 | android:background="@color/light_gray" /> | ||
35 | |||
36 | <EditText | ||
37 | android:id="@+id/username" | ||
38 | android:layout_width="match_parent" | ||
39 | android:layout_height="match_parent" | ||
40 | android:background="@color/transparent" | ||
41 | android:hint="@string/user_name_hint" | ||
42 | android:paddingLeft="6dp" /> | ||
43 | </LinearLayout> | ||
44 | |||
45 | <LinearLayout | ||
46 | android:layout_width="match_parent" | ||
47 | android:layout_height="31dp" | ||
48 | android:layout_marginLeft="35dp" | ||
49 | android:layout_marginRight="35dp" | ||
50 | android:layout_marginTop="16dp" | ||
51 | android:background="@color/white" | ||
52 | android:orientation="horizontal" > | ||
53 | |||
54 | <ImageView | ||
55 | android:layout_width="wrap_content" | ||
56 | android:layout_height="wrap_content" | ||
57 | android:layout_gravity="center_vertical" | ||
58 | android:layout_marginLeft="12.5dp" | ||
59 | android:layout_marginRight="12.5dp" | ||
60 | android:src="@drawable/ic_pwd" /> | ||
61 | |||
62 | <View | ||
63 | android:layout_width="1dp" | ||
64 | android:layout_height="20dp" | ||
65 | android:layout_gravity="center_vertical" | ||
66 | android:background="@color/light_gray" /> | ||
67 | |||
68 | <EditText | ||
69 | android:id="@+id/pwd" | ||
70 | android:layout_width="match_parent" | ||
71 | android:layout_height="match_parent" | ||
72 | android:background="@color/white" | ||
73 | android:hint="@string/password_hint" | ||
74 | android:inputType="textPassword" | ||
75 | android:paddingLeft="6dp" /> | ||
76 | </LinearLayout> | ||
77 | |||
78 | <LinearLayout | ||
79 | android:layout_width="fill_parent" | ||
80 | android:layout_height="wrap_content" | ||
81 | android:layout_marginLeft="35dp" | ||
82 | android:layout_marginRight="35dp" | ||
83 | android:layout_marginTop="16dp" | ||
84 | android:orientation="horizontal" > | ||
85 | |||
86 | <Button | ||
87 | android:id="@+id/gump_reg" | ||
88 | android:layout_width="fill_parent" | ||
89 | android:layout_height="wrap_content" | ||
90 | android:layout_marginRight="10dp" | ||
91 | android:layout_weight="1" | ||
92 | android:background="@drawable/btn_green_bg" | ||
93 | android:text="@string/signup" | ||
94 | android:textColor="@color/white" /> | ||
95 | |||
96 | <Button | ||
97 | android:id="@+id/gump_login" | ||
98 | android:layout_width="fill_parent" | ||
99 | android:layout_height="wrap_content" | ||
100 | android:layout_marginLeft="11dp" | ||
101 | android:layout_weight="1" | ||
102 | android:background="@drawable/btn_orange_bg" | ||
103 | android:gravity="center" | ||
104 | android:text="@string/login" | ||
105 | android:textColor="@android:color/white" | ||
106 | android:textSize="15sp" | ||
107 | android:textStyle="bold" /> | ||
108 | </LinearLayout> | ||
109 | |||
110 | <Button | ||
111 | android:id="@+id/play" | ||
112 | android:layout_width="fill_parent" | ||
113 | android:layout_height="wrap_content" | ||
114 | android:layout_marginBottom="16dp" | ||
115 | android:layout_marginLeft="35dp" | ||
116 | android:layout_marginRight="35dp" | ||
117 | android:layout_marginTop="16dp" | ||
118 | android:background="@drawable/btn_orange_bg" | ||
119 | android:padding="5dp" | ||
120 | android:text="@string/quick_play" | ||
121 | android:textColor="@android:color/white" | ||
122 | android:textSize="16sp" | ||
123 | android:textStyle="bold" /> | ||
124 | |||
125 | <ImageView | ||
126 | android:layout_width="fill_parent" | ||
127 | android:layout_height="wrap_content" | ||
128 | android:layout_marginLeft="35dp" | ||
129 | android:layout_marginRight="35dp" | ||
130 | android:background="@drawable/horizontal_line" /> | ||
131 | </LinearLayout> | ||
132 | |||
133 | <LinearLayout | ||
134 | android:layout_width="match_parent" | ||
135 | android:layout_height="wrap_content" | ||
136 | android:background="@drawable/bottom_light_bg" | ||
137 | android:gravity="center_horizontal" > | ||
138 | |||
139 | </LinearLayout> | ||
140 | |||
141 | </LinearLayout> |
InlandSDKRelease/res/layout/fragment_signup.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:layout_width="wrap_content" | ||
4 | android:layout_height="wrap_content" | ||
5 | android:scrollbars="none" > | ||
6 | |||
7 | <LinearLayout | ||
8 | android:layout_width="wrap_content" | ||
9 | android:layout_height="wrap_content" | ||
10 | android:minWidth="292dp" | ||
11 | android:orientation="vertical" > | ||
12 | |||
13 | <LinearLayout | ||
14 | android:layout_width="match_parent" | ||
15 | android:layout_height="wrap_content" | ||
16 | android:background="@color/white_translucent" | ||
17 | android:orientation="vertical" > | ||
18 | |||
19 | <View | ||
20 | android:layout_width="match_parent" | ||
21 | android:layout_height="1dp" | ||
22 | android:background="@color/light_gray" /> | ||
23 | |||
24 | <EditText | ||
25 | android:id="@+id/username" | ||
26 | android:layout_width="match_parent" | ||
27 | android:layout_height="31dp" | ||
28 | android:layout_marginBottom="10dp" | ||
29 | android:layout_marginLeft="35dp" | ||
30 | android:layout_marginRight="35dp" | ||
31 | android:layout_marginTop="15dp" | ||
32 | android:paddingLeft="8dp" | ||
33 | android:background="@color/white" | ||
34 | android:hint="@string/user_name_hint" | ||
35 | android:imeOptions="flagNoExtractUi" | ||
36 | android:textColor="@color/black_text" /> | ||
37 | |||
38 | <EditText | ||
39 | android:id="@+id/pwd" | ||
40 | android:layout_width="match_parent" | ||
41 | android:layout_height="31dp" | ||
42 | android:layout_marginBottom="10dp" | ||
43 | android:layout_marginLeft="35dp" | ||
44 | android:layout_marginRight="35dp" | ||
45 | android:layout_marginTop="10dp" | ||
46 | android:paddingLeft="8dp" | ||
47 | android:background="@color/white" | ||
48 | android:hint="@string/password_hint" | ||
49 | android:imeOptions="flagNoExtractUi" | ||
50 | android:inputType="textPassword" | ||
51 | android:textColor="@color/black_text" /> | ||
52 | </LinearLayout> | ||
53 | |||
54 | <LinearLayout | ||
55 | android:layout_width="match_parent" | ||
56 | android:layout_height="wrap_content" | ||
57 | android:background="@drawable/bottom_light_bg" > | ||
58 | |||
59 | <Button | ||
60 | android:id="@+id/signup" | ||
61 | android:layout_width="match_parent" | ||
62 | android:layout_height="wrap_content" | ||
63 | android:layout_marginLeft="35dp" | ||
64 | android:layout_marginRight="35dp" | ||
65 | android:layout_marginTop="8dp" | ||
66 | android:background="@drawable/btn_orange_bg" | ||
67 | android:padding="5dp" | ||
68 | android:text="@string/signup" | ||
69 | android:textColor="@android:color/white" | ||
70 | android:textSize="16sp" /> | ||
71 | </LinearLayout> | ||
72 | </LinearLayout> | ||
73 | |||
74 | </ScrollView> |
InlandSDKRelease/res/layout/login_container.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:id="@+id/login_root" | ||
4 | android:layout_width="match_parent" | ||
5 | android:layout_height="match_parent" | ||
6 | android:orientation="vertical" > | ||
7 | |||
8 | </LinearLayout> |
InlandSDKRelease/res/layout/pay_container.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:layout_width="match_parent" | ||
4 | android:layout_height="match_parent" | ||
5 | android:background="@color/payment_common_bg" | ||
6 | android:orientation="vertical" > | ||
7 | |||
8 | <Button | ||
9 | android:id="@+id/wx_pay" | ||
10 | android:layout_width="match_parent" | ||
11 | android:layout_height="wrap_content" | ||
12 | android:text="微信支付" /> | ||
13 | |||
14 | <Button | ||
15 | android:id="@+id/ali_pay" | ||
16 | android:layout_width="match_parent" | ||
17 | android:layout_height="wrap_content" | ||
18 | android:text="支付宝" /> | ||
19 | |||
20 | <Button | ||
21 | android:id="@+id/union_pay" | ||
22 | android:layout_width="match_parent" | ||
23 | android:layout_height="wrap_content" | ||
24 | android:text="银联支付" /> | ||
25 | |||
26 | </LinearLayout> |
InlandSDKRelease/res/layout/title.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
3 | android:layout_width="match_parent" | ||
4 | android:layout_height="wrap_content" | ||
5 | android:background="@drawable/title_light_bg" > | ||
6 | |||
7 | <ImageView | ||
8 | android:id="@+id/btn_back" | ||
9 | android:layout_width="wrap_content" | ||
10 | android:layout_height="wrap_content" | ||
11 | android:layout_alignParentLeft="true" | ||
12 | android:layout_centerVertical="true" | ||
13 | android:layout_marginLeft="10dp" | ||
14 | android:paddingLeft="20dp" | ||
15 | android:paddingRight="10dp" | ||
16 | android:src="@drawable/ic_back_dark" /> | ||
17 | |||
18 | <TextView | ||
19 | android:id="@+id/up_txt" | ||
20 | android:layout_width="wrap_content" | ||
21 | android:layout_height="wrap_content" | ||
22 | android:layout_centerVertical="true" | ||
23 | android:layout_toRightOf="@id/btn_back" | ||
24 | android:textColor="@color/black_text" | ||
25 | android:textSize="18sp" /> | ||
26 | |||
27 | <ImageView | ||
28 | android:id="@+id/log" | ||
29 | android:layout_width="wrap_content" | ||
30 | android:layout_height="wrap_content" | ||
31 | android:layout_marginTop="27dp" | ||
32 | android:layout_marginLeft="35dp" | ||
33 | android:visibility="gone" /> | ||
34 | |||
35 | <TextView | ||
36 | android:id="@+id/title" | ||
37 | android:layout_width="wrap_content" | ||
38 | android:layout_height="wrap_content" | ||
39 | android:layout_centerInParent="true" | ||
40 | android:textColor="@android:color/black" | ||
41 | android:textSize="18sp" /> | ||
42 | |||
43 | </RelativeLayout> |
InlandSDKRelease/res/values-v11/styles.xml
1 | <resources> | File was deleted | |
2 | |||
3 | <!-- | ||
4 | Base application theme for API 11+. This theme completely replaces | ||
5 | AppBaseTheme from res/values/styles.xml on API 11+ devices. | ||
6 | --> | ||
7 | <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> | ||
8 | <!-- API 11 theme customizations can go here. --> | ||
9 | </style> | ||
10 | |||
11 | </resources> | ||
12 | 1 | <resources> |
InlandSDKRelease/res/values-v14/styles.xml
1 | <resources> | File was deleted | |
2 | |||
3 | <!-- | ||
4 | Base application theme for API 14+. This theme completely replaces | ||
5 | AppBaseTheme from BOTH res/values/styles.xml and | ||
6 | res/values-v11/styles.xml on API 14+ devices. | ||
7 | --> | ||
8 | <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> | ||
9 | <!-- API 14 theme customizations can go here. --> | ||
10 | </style> | ||
11 | |||
12 | </resources> | ||
13 | 1 | <resources> |
InlandSDKRelease/res/values/colors.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <resources> | ||
3 | <color name="white">#FFFFFF</color> | ||
4 | <color name="white_translucent">#D9FFFFFF</color> | ||
5 | <color name="black_text">#3f3c38</color> | ||
6 | <color name="light_gray">#c9c9c9</color> | ||
7 | |||
8 | <color name="transparent">#00000000</color> | ||
9 | |||
10 | <color name="btn_green_normal">#3eb370</color> | ||
11 | <color name="btn_green_pressed">#3cca79</color> | ||
12 | <color name="orange_normal">#f8b500</color> | ||
13 | <color name="orange_pressed">#ffc62c</color> | ||
14 | |||
15 | <!-- payment--> | ||
16 | <color name="payment_common_bg">#f2efeb</color> | ||
17 | </resources> | ||
18 |
InlandSDKRelease/res/values/strings.xml
1 | <resources> | 1 | <resources> |
2 | 2 | ||
3 | <string name="app_name">InlandSDKRelease</string> | 3 | <string name="user_name_hint">Email</string> |
4 | <string name="password_hint">Password</string> | ||
5 | <string name="switch_user">Change account</string> | ||
6 | <string name="loging">Signing...</string> | ||
7 | <string name="loading">loading</string> | ||
4 | 8 | ||
9 | <string name="signup">Signup</string> | ||
10 | <string name="login">Login</string> | ||
11 | <string name="quick_play">Play</string> | ||
12 | <!-- toast --> | ||
13 | <string name="illegal_uname_tip">Invalid Email</string> | ||
14 | <string name="illegal_pwd_tip">Invalid Password (6–20 characters).</string> | ||
15 | <string name="illegal_user_exist">Email has already used</string> | ||
16 | <string name="illegal_pwd_invalid">Password is incorrect. Please try again.</string> | ||
17 | <string name="illegal_user_not_exist">Invalid Email</string> | ||
18 | <string name="invalid_email">Invalid Email</string> | ||
19 | <string name="login_fail">Login failed</string> | ||
20 | <string name="signup_fail">Signup failed</string> | ||
21 | <string name="signup_success">Sign Up Successfully</string> | ||
22 | <string name="gen_quick_acc_err">Login failed, please try again</string> | ||
23 | <string name="quick_login_err">Login failed, please try again</string> | ||
24 | <string name="net_error">Internet unavailable, please check</string> | ||
25 | |||
26 | <string-array name="payment_channel"> | ||
27 | <item>微信支付</item> | ||
28 | <item>支付宝</item> | ||
29 | <item>银联支付</item> | ||
30 | </string-array> | ||
5 | </resources> | 31 | </resources> |
6 | 32 |
InlandSDKRelease/res/values/themes.xml
File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
2 | <resources> | ||
3 | |||
4 | <style name="Theme.TransparentWin" parent="android:Theme"> | ||
5 | <item name="android:windowFrame">@null</item> | ||
6 | <item name="android:windowIsFloating">true</item> | ||
7 | <item name="android:windowIsTranslucent">true</item> | ||
8 | <item name="android:windowNoTitle">true</item> | ||
9 | <item name="android:windowBackground">@color/transparent</item> | ||
10 | <item name="android:backgroundDimEnabled">true</item> | ||
11 | <item name="android:windowFullscreen">true</item> | ||
12 | </style> | ||
13 | |||
14 | <style name="Theme.WinForExchange" parent="@style/Theme.TransparentWin"> | ||
15 | <item name="android:backgroundDimEnabled">true</item> | ||
16 | </style> | ||
17 | |||
18 | </resources> |