Skip to content

Commit 11579ee

Browse files
committed
Client:显示APIJSON请求全用实时生成的;优化JSONRequest encode和decode
1 parent 6194355 commit 11579ee

11 files changed

Lines changed: 508 additions & 480 deletions

File tree

APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/gen/apijson/demo/R.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ public static final class drawable {
2121
}
2222
public static final class id {
2323
public static final int btnQueryQuery=0x7f070003;
24+
public static final int btnSelectAccessError=0x7f07000c;
25+
public static final int btnSelectAccessPermitted=0x7f07000d;
26+
public static final int btnSelectArray=0x7f07000a;
27+
public static final int btnSelectColumns=0x7f070008;
28+
public static final int btnSelectComplex=0x7f07000b;
29+
public static final int btnSelectDelete=0x7f070006;
30+
public static final int btnSelectPost=0x7f070004;
31+
public static final int btnSelectPut=0x7f070005;
32+
public static final int btnSelectRely=0x7f070009;
33+
public static final int btnSelectSingle=0x7f070007;
34+
public static final int btnSelectUpdateLog=0x7f07000e;
2435
public static final int etQueryUrl=0x7f070002;
2536
public static final int pbQuery=0x7f070001;
2637
public static final int tvQueryResult=0x7f070000;
@@ -32,6 +43,8 @@ public static final class layout {
3243
public static final class string {
3344
public static final int access_error=0x7f050017;
3445
public static final int access_permitted=0x7f050018;
46+
public static final int apijson_info=0x7f05001f;
47+
public static final int apijson_slogan=0x7f05001e;
3548
public static final int app_name=0x7f050000;
3649
public static final int app_version=0x7f050001;
3750
public static final int array=0x7f050015;
Lines changed: 110 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,113 @@
1-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
1+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
22
xmlns:tools="http://schemas.android.com/tools"
33
style="@style/activity_page" >
44

5-
<ScrollView style="@style/match_match" >
6-
7-
<LinearLayout
8-
style="@style/match_match"
9-
android:orientation="vertical" >
10-
11-
<TextView
12-
style="@style/select_name"
13-
android:text="@string/post"
14-
android:textColor="@android:color/black" />
15-
16-
<Button
17-
style="@style/select_json"
18-
android:onClick="selectPost"
19-
android:text="@string/demo_post" />
20-
21-
<TextView
22-
style="@style/select_name"
23-
android:text="@string/put" />
24-
25-
<Button
26-
style="@style/select_json"
27-
android:onClick="selectPut"
28-
android:text="@string/demo_put" />
29-
30-
<TextView
31-
style="@style/select_name"
32-
android:text="@string/delete"
33-
android:textColor="@android:color/black" />
34-
35-
<Button
36-
style="@style/select_json"
37-
android:onClick="selectDelete"
38-
android:text="@string/demo_delete" />
39-
40-
<TextView
41-
style="@style/select_name"
42-
android:text="@string/get"
43-
android:textColor="@android:color/black" />
44-
45-
<TextView
46-
style="@style/select_name"
47-
android:text="@string/single" />
48-
49-
<Button
50-
style="@style/select_json"
51-
android:onClick="selectSingle"
52-
android:text="@string/demo_single" />
53-
54-
<TextView
55-
style="@style/select_name"
56-
android:text="@string/columns" />
57-
58-
<Button
59-
style="@style/select_json"
60-
android:onClick="selectColumns"
61-
android:text="@string/demo_columns" />
62-
63-
<TextView
64-
style="@style/select_name"
65-
android:text="@string/rely" />
66-
67-
<Button
68-
style="@style/select_json"
69-
android:onClick="selectRely"
70-
android:text="@string/demo_rely" />
71-
72-
<TextView
73-
style="@style/select_name"
74-
android:text="@string/array" />
75-
76-
<Button
77-
style="@style/select_json"
78-
android:onClick="selectArray"
79-
android:text="@string/demo_array" />
80-
81-
<TextView
82-
style="@style/select_name"
83-
android:text="@string/complex" />
84-
85-
<Button
86-
style="@style/select_json"
87-
android:onClick="selectComplex"
88-
android:text="@string/demo_complex" />
89-
90-
<TextView
91-
style="@style/select_name"
92-
android:text="@string/access_error" />
93-
94-
<Button
95-
style="@style/select_json"
96-
android:onClick="selectAccessError"
97-
android:text="@string/demo_wallet" />
98-
99-
<TextView
100-
style="@style/select_name"
101-
android:text="@string/access_permitted" />
102-
103-
<Button
104-
style="@style/select_json"
105-
android:onClick="selectAccessPermitted"
106-
android:text="@string/demo_wallet_with_access" />
107-
108-
<Button
109-
style="@style/match_wrap"
110-
android:layout_marginTop="30dp"
111-
android:onClick="toUpdateLog"
112-
android:text="@string/update_log" />
113-
</LinearLayout>
114-
</ScrollView>
115-
116-
</LinearLayout>
5+
<LinearLayout
6+
style="@style/match_match"
7+
android:orientation="vertical" >
8+
9+
<TextView
10+
style="@style/select_name"
11+
android:text="@string/post"
12+
android:textColor="@android:color/black" />
13+
14+
<Button
15+
android:id="@+id/btnSelectPost"
16+
style="@style/select_json"
17+
android:text="@string/demo_post" />
18+
19+
<TextView
20+
style="@style/select_name"
21+
android:text="@string/put" />
22+
23+
<Button
24+
android:id="@+id/btnSelectPut"
25+
style="@style/select_json"
26+
android:text="@string/demo_put" />
27+
28+
<TextView
29+
style="@style/select_name"
30+
android:text="@string/delete"
31+
android:textColor="@android:color/black" />
32+
33+
<Button
34+
android:id="@+id/btnSelectDelete"
35+
style="@style/select_json"
36+
android:text="@string/demo_delete" />
37+
38+
<TextView
39+
style="@style/select_name"
40+
android:text="@string/get"
41+
android:textColor="@android:color/black" />
42+
43+
<TextView
44+
style="@style/select_name"
45+
android:text="@string/single" />
46+
47+
<Button
48+
android:id="@+id/btnSelectSingle"
49+
style="@style/select_json"
50+
android:text="@string/demo_single" />
51+
52+
<TextView
53+
style="@style/select_name"
54+
android:text="@string/columns" />
55+
56+
<Button
57+
android:id="@+id/btnSelectColumns"
58+
style="@style/select_json"
59+
android:text="@string/demo_columns" />
60+
61+
<TextView
62+
style="@style/select_name"
63+
android:text="@string/rely" />
64+
65+
<Button
66+
android:id="@+id/btnSelectRely"
67+
style="@style/select_json"
68+
android:text="@string/demo_rely" />
69+
70+
<TextView
71+
style="@style/select_name"
72+
android:text="@string/array" />
73+
74+
<Button
75+
android:id="@+id/btnSelectArray"
76+
style="@style/select_json"
77+
android:text="@string/demo_array" />
78+
79+
<TextView
80+
style="@style/select_name"
81+
android:text="@string/complex" />
82+
83+
<Button
84+
android:id="@+id/btnSelectComplex"
85+
style="@style/select_json"
86+
android:text="@string/demo_complex" />
87+
88+
<TextView
89+
style="@style/select_name"
90+
android:text="@string/access_error" />
91+
92+
<Button
93+
android:id="@+id/btnSelectAccessError"
94+
style="@style/select_json"
95+
android:text="@string/demo_wallet" />
96+
97+
<TextView
98+
style="@style/select_name"
99+
android:text="@string/access_permitted" />
100+
101+
<Button
102+
android:id="@+id/btnSelectAccessPermitted"
103+
style="@style/select_json"
104+
android:text="@string/demo_wallet_with_access" />
105+
106+
<Button
107+
android:id="@+id/btnSelectUpdateLog"
108+
style="@style/match_wrap"
109+
android:layout_marginTop="30dp"
110+
android:text="@string/update_log" />
111+
</LinearLayout>
112+
113+
</ScrollView>

APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/res/values-en/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<string name="user_id_changed">"userId was changed to %1$s ,you can restore it by [DELETE]"</string>
1919
<string name="browser_can_only_receive_get_response">Browsers can only receive GET responses</string>
2020
<string name="query_error">There may be something wrong,you can follow by the steps:\n\n1.Check your net connection\n\n2.Check the url whether it\'s an available ipv4 address\n\n3.Long click the [ %1$s ] button to open the request by web browser\n\n4.Check logs outputed on the target server\n\n5.Try again</string>
21-
21+
<string name="apijson_slogan">APIJSON,&#160;let&#160;interfaces&#160;go&#160;to&#160;hell!</string>
22+
<string name="apijson_info">APIJSON&#160;is&#160;a&#160;JSON&#160;Transmission&#160;Structure&#160;Protocol&#8230;</string>
2223
</resources>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
<string name="user_id_changed">"userId已改为 %1$s ,【删】后会恢复默认值"</string>
3232
<string name="browser_can_only_receive_get_response">用浏览器只能获取GET结果</string>
3333
<string name="query_error">可能出现了一些问题,可以按照以下步骤解决:\n\n1.检查网络连接\n\n2.检查url是否为一个可用的IPV4地址\n\n3.长按[ %1$s ]按钮用浏览器发送请求\n\n4.查看目标服务器上的log\n\n5.再试一次</string>
34-
34+
<string name="apijson_slogan">APIJSON,&#160;let&#160;interfaces&#160;go&#160;to&#160;hell!</string>
35+
<string name="apijson_info">APIJSON&#160;is&#160;a&#160;JSON&#160;Transmission&#160;Structure&#160;Protocol&#8230;</string>
3536
</resources>

0 commit comments

Comments
 (0)