Browse Source

代码修改

huyuguo 3 years ago
parent
commit
5c68143e90

+ 2 - 4
app/src/main/java/com/electric/chargingpile/activity/LoginActivity.java

60
    String encode_token;
60
    String encode_token;
61
    Context mContext;
61
    Context mContext;
62
    public static final int RESULT_SUCCESS = 0;
62
    public static final int RESULT_SUCCESS = 0;
63
    private Boolean flag = true;
63
    private Boolean flag = false;
64
64
65
    public void createDialog() {
65
    public void createDialog() {
66
        if (pd_info == null) {
66
        if (pd_info == null) {
281
            Toast.makeText(this, "手机号码错误,您输入的是一个无效手机号码", Toast.LENGTH_SHORT).show();
281
            Toast.makeText(this, "手机号码错误,您输入的是一个无效手机号码", Toast.LENGTH_SHORT).show();
282
            return;
282
            return;
283
        } else if (!flag) {
283
        } else if (!flag) {
284
            Toast.makeText(this, "请勾选协议与隐私政策", Toast.LENGTH_SHORT).show();
285
            login.setEnabled(false);
286
            login.setBackgroundResource(R.drawable.textview_1green);
284
            Toast.makeText(this, "请阅读并同意相关协议", Toast.LENGTH_SHORT).show();
287
        } else {
285
        } else {
288
            createDialog();
286
            createDialog();
289
            getUserInfo();
287
            getUserInfo();

+ 2 - 12
app/src/main/java/com/electric/chargingpile/activity/RegisterActivity.java

82
    Context context;
82
    Context context;
83
    String no;
83
    String no;
84
    private Bitmap download_bmp;
84
    private Bitmap download_bmp;
85
    private Boolean flag = true;
85
    private Boolean flag = false;
86
    private android.view.animation.Animation animation;
86
    private android.view.animation.Animation animation;
87
    private static final int RC_CAMERA_PERM = 123;
87
    private static final int RC_CAMERA_PERM = 123;
88

88

352
                }
352
                }
353
                break;
353
                break;
354
            case R.id.tv_make_sure:
354
            case R.id.tv_make_sure:
355
//                SharedPreferences mySharedPreferences = getSharedPreferences(imei,
356
//                        Activity.MODE_PRIVATE);
357
//                no = mySharedPreferences.getString(imei, "0");
358
//                Log.e("@@@",no);
359
//                if (Integer.parseInt(no) < 2){
360

361
                if (checkTextSubmit()) {
355
                if (checkTextSubmit()) {
362
                    if (!flag) {
356
                    if (!flag) {
363
                        Toast.makeText(this, "请勾选协议与隐私政策", Toast.LENGTH_SHORT).show();
364
                        tvSure.setEnabled(false);
365
                        tvSure.setBackgroundResource(R.drawable.textview_1green);
366

357
                        Toast.makeText(this, "请阅读并同意相关协议", Toast.LENGTH_SHORT).show();
367
                    } else {
358
                    } else {
368
                        MobclickAgent.onEvent(getApplicationContext(), "0901");
359
                        MobclickAgent.onEvent(getApplicationContext(), "0901");
369
                        tvSure.setEnabled(true);
360
                        tvSure.setEnabled(true);
397
                    iv_tongyi.setImageResource(R.drawable.icon_login_select);
388
                    iv_tongyi.setImageResource(R.drawable.icon_login_select);
398
                    flag = false;
389
                    flag = false;
399
                    tvSure.setBackgroundResource(R.drawable.textview_1green);
390
                    tvSure.setBackgroundResource(R.drawable.textview_1green);
400
//                    tvSure.setTextColor(getResources().getColor(R.color.lvse));
401
                    tvSure.setEnabled(false);
391
                    tvSure.setEnabled(false);
402
                } else {
392
                } else {
403
                    iv_tongyi.setImageResource(R.drawable.icon_login_selected);
393
                    iv_tongyi.setImageResource(R.drawable.icon_login_selected);

+ 2 - 2
app/src/main/res/layout/activity_login.xml

150
                    android:id="@+id/iv_tongyi"
150
                    android:id="@+id/iv_tongyi"
151
                    android:layout_width="48px"
151
                    android:layout_width="48px"
152
                    android:layout_height="48px"
152
                    android:layout_height="48px"
153
                    android:src="@drawable/icon_login_selected"
153
                    android:src="@drawable/icon_login_select"
154
                    android:layout_gravity="center"
154
                    android:layout_gravity="center"
155
                    android:layout_marginLeft="58px"
155
                    android:layout_marginLeft="58px"
156
                    android:layout_marginBottom="1dp"/>
156
                    android:layout_marginBottom="1dp"/>
158
                <TextView
158
                <TextView
159
                    android:layout_width="wrap_content"
159
                    android:layout_width="wrap_content"
160
                    android:layout_height="wrap_content"
160
                    android:layout_height="wrap_content"
161
                    android:text="登录即代表您同意"
161
                    android:text="已阅读并同意"
162
                    android:textSize="13sp"
162
                    android:textSize="13sp"
163
                    android:textColor="@color/ui_69"
163
                    android:textColor="@color/ui_69"
164
                    android:layout_marginLeft="10px"
164
                    android:layout_marginLeft="10px"

+ 2 - 2
app/src/main/res/layout/activity_register.xml

236
                        android:id="@+id/iv_tongyi"
236
                        android:id="@+id/iv_tongyi"
237
                        android:layout_width="48px"
237
                        android:layout_width="48px"
238
                        android:layout_height="48px"
238
                        android:layout_height="48px"
239
                        android:src="@drawable/icon_login_selected"
239
                        android:src="@drawable/icon_login_select"
240
                        android:layout_gravity="center"
240
                        android:layout_gravity="center"
241
                        android:layout_marginLeft="58px"
241
                        android:layout_marginLeft="58px"
242
                        android:layout_marginBottom="1dp"/>
242
                        android:layout_marginBottom="1dp"/>
244
                    <TextView
244
                    <TextView
245
                        android:layout_width="wrap_content"
245
                        android:layout_width="wrap_content"
246
                        android:layout_height="wrap_content"
246
                        android:layout_height="wrap_content"
247
                        android:text="注册即代表您同意"
247
                        android:text="已阅读并同意"
248
                        android:textSize="13sp"
248
                        android:textSize="13sp"
249
                        android:textColor="@color/ui_69"
249
                        android:textColor="@color/ui_69"
250
                        android:layout_marginLeft="10px"
250
                        android:layout_marginLeft="10px"