Skip to content

Commit a9ac684

Browse files
committed
* resolved #38 添加联系方式(email)
1 parent 0d5f6f3 commit a9ac684

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

app/res/layout/acty_feedback.xml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,25 @@
1919
android:lines="6"
2020
android:textColor="@android:color/black"
2121
android:textSize="16sp"
22-
bootstrapbutton:be_roundedCorners="true"
2322
bootstrapbutton:be_state="primary" >
2423

2524
<requestFocus />
2625
</com.beardedhen.androidbootstrap.BootstrapEditText>
2726

27+
<com.beardedhen.androidbootstrap.BootstrapEditText
28+
android:id="@+id/et_user_contact"
29+
android:layout_width="match_parent"
30+
android:layout_height="wrap_content"
31+
android:layout_margin="10dp"
32+
android:gravity="left|center_vertical"
33+
android:hint="你的联系方式(邮箱,选填)"
34+
android:singleLine="true"
35+
android:textColor="@android:color/black"
36+
android:textSize="16sp"
37+
bootstrapbutton:be_state="primary" >
38+
39+
</com.beardedhen.androidbootstrap.BootstrapEditText>
40+
2841
<RadioGroup
2942
android:id="@+id/rg_type"
3043
android:layout_width="match_parent"
@@ -54,17 +67,17 @@
5467
android:layout_gravity="center_horizontal"
5568
android:layout_margin="10dp"
5669
android:text="提 交"
57-
android:textSize="16sp"
70+
android:textSize="18sp"
5871
bootstrapbutton:bb_type="primary" />
5972

6073
<TextView
6174
android:layout_width="wrap_content"
6275
android:layout_height="0dp"
6376
android:layout_margin="10dp"
77+
android:layout_marginBottom="2dp"
6478
android:layout_weight="1"
6579
android:gravity="bottom|left"
66-
android:layout_marginBottom="2dp"
67-
android:textSize="12sp"
68-
android:text="* 你的错误反馈/意见建议能帮我们打造更好的应用" />
80+
android:text="* 你的错误反馈/意见建议能帮我们打造更好的应用"
81+
android:textSize="12sp" />
6982

7083
</LinearLayout>

app/src/io/github/emanual/app/ui/Feedback.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class Feedback extends BaseActivity {
2828

2929

3030
@InjectView(R.id.et_content) EditText et_content;
31+
@InjectView(R.id.et_user_contact) EditText et_user_contact;
3132
@InjectView(R.id.rg_type) RadioGroup rg_type;
3233

3334
ProgressDialog mProgressDialog ;
@@ -73,8 +74,9 @@ public class Feedback extends BaseActivity {
7374

7475
@OnClick(R.id.btn_submit) public void submit() {
7576
String content = et_content.getText().toString();
77+
String user_contact = et_user_contact.getText().toString(); //optional
7678
String type = rg_type.getCheckedRadioButtonId() == R.id.rb_type_advice ? TYPE_ADVICE
77-
: TYPE_ADVICE;
79+
: TYPE_REPORT;
7880
String app_version ="";
7981
String system_version = Build.VERSION.RELEASE + "-"+Build.VERSION.SDK_INT;
8082
String model = Build.BRAND+" "+Build.MODEL;
@@ -94,6 +96,7 @@ public class Feedback extends BaseActivity {
9496

9597
AVObject fb = new AVObject("FeedBack");
9698
fb.put("content",content);
99+
fb.put("user_contact",user_contact);
97100
fb.put("type",type);
98101
fb.put("app_version",app_version);
99102
fb.put("system_version",system_version);

0 commit comments

Comments
 (0)