Skip to content

Commit 5d70d03

Browse files
committed
Client:完成钱包界面充值和提现功能
1 parent c036e05 commit 5d70d03

File tree

18 files changed

+762
-141
lines changed

18 files changed

+762
-141
lines changed

APIJSON(Android)/APIJSON(ADT)/APIJSONApp/APIJSONApp/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@
119119
android:name="apijson.demo.client.activity_fragment.QRCodeActivity"
120120
android:screenOrientation="portrait"
121121
android:windowSoftInputMode="stateAlwaysHidden" />
122+
<activity
123+
android:name="apijson.demo.client.activity_fragment.NumberPasswordActivity"
124+
android:screenOrientation="portrait"
125+
android:windowSoftInputMode="stateVisible|adjustPan|adjustResize|adjustUnspecified" />
122126

123127

124128
<!-- ZBLibrary <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/llPasswordSetting"
4+
style="@style/activity_page" >
5+
6+
<RelativeLayout style="@style/topbar_bg" >
7+
8+
<ImageView style="@style/topbar_return_img" />
9+
10+
<TextView
11+
android:id="@+id/tvPasswordSettingTitle"
12+
style="@style/topbar_title"
13+
android:layout_centerHorizontal="true"
14+
android:text="支付密码" />
15+
</RelativeLayout>
16+
17+
<LinearLayout
18+
style="@style/ll_vertical_match_match"
19+
android:background="@color/activity_bg" >
20+
21+
<TextView
22+
android:id="@+id/tvPasswordSettingPayRemind"
23+
style="@style/text_small_black"
24+
android:layout_margin="@dimen/margin_big"
25+
android:text="设置6位数字支付密码" />
26+
27+
<RelativeLayout style="@style/wrap_wrap" >
28+
29+
<EditText
30+
android:id="@+id/etPasswordSettingPay"
31+
android:layout_width="280dp"
32+
android:layout_height="42dp"
33+
android:background="@drawable/null_drawable"
34+
android:cursorVisible="false"
35+
android:inputType="numberPassword"
36+
android:maxLength="6"
37+
android:singleLine="true" >
38+
39+
<requestFocus />
40+
</EditText>
41+
42+
<!-- 怎么设置都无效 android:descendantFocusability="afterDescendants" -->
43+
44+
<LinearLayout
45+
android:id="@+id/llPasswordSettingPayNumberContainer"
46+
style="@style/ll_horizontal_wrap_wrap"
47+
android:layout_centerInParent="true"
48+
android:background="@drawable/edit_item_text_bg" >
49+
50+
<TextView
51+
android:id="@+id/tvPasswordSettingPayNumber0"
52+
style="@style/pay_password_tv" />
53+
54+
<View style="@style/pay_password_divider" />
55+
56+
<TextView
57+
android:id="@+id/tvPasswordSettingPayNumber1"
58+
style="@style/pay_password_tv" />
59+
60+
<View style="@style/pay_password_divider" />
61+
62+
<TextView
63+
android:id="@+id/tvPasswordSettingPayNumber2"
64+
style="@style/pay_password_tv" />
65+
66+
<View style="@style/pay_password_divider" />
67+
68+
<TextView
69+
android:id="@+id/tvPasswordSettingPayNumber3"
70+
style="@style/pay_password_tv" />
71+
72+
<View style="@style/pay_password_divider" />
73+
74+
<TextView
75+
android:id="@+id/tvPasswordSettingPayNumber4"
76+
style="@style/pay_password_tv" />
77+
78+
<View style="@style/pay_password_divider" />
79+
80+
<TextView
81+
android:id="@+id/tvPasswordSettingPayNumber5"
82+
style="@style/pay_password_tv" />
83+
</LinearLayout>
84+
</RelativeLayout>
85+
</LinearLayout>
86+
87+
</LinearLayout>

APIJSON(Android)/APIJSON(ADT)/APIJSONApp/APIJSONApp/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
<string name="publish_succeed">发布成功</string>
77
<string name="comment_failed">评论失败,再试一次吧^_^</string>
88
<string name="comment_succeed">评论成功</string>
9-
9+
<string name="please_input_password">请输入密码</string>
10+
<string name="password_not_equal">密码不一致</string>
1011
</resources>

APIJSON(Android)/APIJSON(ADT)/APIJSONApp/APIJSONApp/res/values/styles.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,19 @@
1717
<item name="android:textColor">@color/black_to_white_selector</item>
1818
</style>
1919

20+
<style name="pay_password_tv">
21+
<item name="android:textSize">27sp</item>
22+
<item name="android:layout_height">42dp</item>
23+
<item name="android:gravity">center</item>
24+
<item name="android:layout_width">45dp</item>
25+
<item name="android:textColor">@color/black</item>
26+
<item name="android:inputType">numberPassword</item>
27+
</style>
28+
29+
<style name="pay_password_divider">
30+
<item name="android:layout_width">2dp</item>
31+
<item name="android:layout_height">match_parent</item>
32+
<item name="android:background">@color/activity_bg</item>
33+
</style>
34+
2035
</resources>

APIJSON(Android)/APIJSON(ADT)/APIJSONApp/APIJSONApp/src/apijson/demo/client/activity_fragment/LoginActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,9 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
341341
case REQUEST_TO_VERIFY:
342342
case REQUEST_TO_REGISTER:
343343
if (data != null) {
344-
String phone = data.getStringExtra(INTENT_PHONE);
345-
String password = data.getStringExtra(requestCode == REQUEST_TO_VERIFY ? INTENT_VERIFY : INTENT_PASSWORD);
344+
String phone = data.getStringExtra(PasswordActivity.RESULT_PHONE);
345+
String password = data.getStringExtra(requestCode == REQUEST_TO_VERIFY
346+
? PasswordActivity.RESULT_VERIFY : PasswordActivity.RESULT_PASSWORD);
346347
if (StringUtil.isPhone(phone)) {
347348
etLoginPhone.setText(phone);
348349
}

0 commit comments

Comments
 (0)