Skip to content

Commit

Permalink
1.ui问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
throne10 committed Sep 25, 2020
1 parent 826e494 commit b8c2a3c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/com/xiaobao/good/sign/SignInActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class SignInActivity extends BaseActivity2 {
Spinner spPurpose;
@BindView(R.id.bt_record)
Button btRecord;
@BindView(R.id.bt_sign)
Button btSign;
private Context context;
private String coorType = "bd09ll";
private String TAG = "X_SignInActivity";
Expand Down Expand Up @@ -84,6 +86,8 @@ public void onResponse(Call<VisitResult> call, Response<VisitResult> response) {
visitId = response.body().getData();
LogUtil.i(TAG, response.body().getData() + "");
Toast.makeText(context, "签到成功。", Toast.LENGTH_LONG).show();
btSign.setText("已签到");
btSign.setBackgroundResource(R.drawable.sign_btn_signed);
isSign = true;
} else {
Toast.makeText(context, "签到请求失败", Toast.LENGTH_LONG).show();
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/sign_btn_signed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<!-- 圆角的半径 -->
<corners android:radius="10dp"/>

<!-- 填充颜色 -->
<solid android:color="#DCDCDC"/>

</shape>

0 comments on commit b8c2a3c

Please sign in to comment.