From caa35eaa7d9cae55a57155d9508d1285999f1bba Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 30 十一月 2023 22:16:42 +0800 Subject: [PATCH] 2023年11月30日22:16:31 --- app/src/main/java/com/hdl/photovoltaic/internet/api/HttpApi.java | 5 app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java | 171 ++++++++++++ app/src/main/res/layout/activity_bind_phone.xml | 186 +++++++++++++ app/src/main/res/values/strings.xml | 5 app/src/main/AndroidManifest.xml | 6 app/src/main/java/com/hdl/photovoltaic/ui/me/AccountAndSecurityActivity.java | 4 app/src/main/res/layout/activity_bind_mail.xml | 185 +++++++++++++ app/src/main/java/com/hdl/photovoltaic/ui/me/BindMailActivity.java | 171 ++++++++++++ app/src/main/java/com/hdl/photovoltaic/other/HdlAccountLogic.java | 73 ++++ app/build.gradle | 2 10 files changed, 798 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5f6271f..12d6ca3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,7 +29,7 @@ minSdk 23 targetSdk 30 versionCode 1 - versionName "1.1.0" + versionName "1.1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index dbf67b1..73beaeb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -73,6 +73,12 @@ android:supportsRtl="true" android:theme="@style/Theme.PhotovoltaicDebug"> <activity + android:name=".ui.me.BindMailActivity" + android:exported="false" /> + <activity + android:name=".ui.me.BindPhoneActivity" + android:exported="false" /> + <activity android:name=".ui.me.TemperatureUnitActivity" android:exported="false" /> <activity diff --git a/app/src/main/java/com/hdl/photovoltaic/internet/api/HttpApi.java b/app/src/main/java/com/hdl/photovoltaic/internet/api/HttpApi.java index 5f41ab8..3e7b715 100644 --- a/app/src/main/java/com/hdl/photovoltaic/internet/api/HttpApi.java +++ b/app/src/main/java/com/hdl/photovoltaic/internet/api/HttpApi.java @@ -104,6 +104,11 @@ public static final String C_POST_UPLOAD_IMAGE = "/home-wisdom/app/images/upload_image"; //涓婁紶鍥剧墖锛堟柊锛� public static final String C_POST_UPLOAD_IMAGE_NEW = "/basis-cosmos/file/upload"; + //缁戝畾璁よ瘉(鎵嬫満/閭) + public static final String C_POST_MEMBERINFO_BINDWITHACCOUNT = "/smart-footstone/member/memberInfo/bindWithAccount"; + //瑙g粦璁よ瘉(鎵嬫満/閭) + public static final String C_POST_MEMBERINFO_UNBINDWITHACCOUNT = "/smart-footstone/member/memberInfo/unbindWithAccount"; + //endregion //endregion diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlAccountLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlAccountLogic.java index f74a509..927a8b1 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlAccountLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlAccountLogic.java @@ -362,13 +362,7 @@ * @param memberSex 鐢ㄦ埛鎬у埆 * @param cloudCallBeak - */ - public void updateMemberInfo_C(String languageType, - String memberName, - String memberBirthday, - String memberHeadIcon, - String loginName, - String memberSex, - CloudCallBeak<Boolean> cloudCallBeak) { + public void updateMemberInfo_C(String languageType, String memberName, String memberBirthday, String memberHeadIcon, String loginName, String memberSex, CloudCallBeak<Boolean> cloudCallBeak) { String requestUrl = HttpApi.C_POST_UPDATE_MEMBER_INFO; JsonObject json = new JsonObject(); if (!TextUtils.isEmpty(languageType)) { @@ -523,6 +517,71 @@ } + /** + * 缁戝畾璁よ瘉(鎵嬫満/閭)(C绔处鍙�) + * + * @param memberPhone 鎵嬫満鍙凤紙缁戝畾鎵嬫満鍙穖emberEmail鍙傛暟浼犵┖锛� + * @param memberEmail 閭锛堢粦瀹氶偖绠眒emberPhone鍙傛暟浼犵┖锛� + * @param verifyCode 楠岃瘉鐮� + */ + public void bindingAccount_C(String memberPhone, String memberEmail, String verifyCode, CloudCallBeak<Boolean> cloudCallBeak) { + String requestUrl = HttpApi.C_POST_MEMBERINFO_BINDWITHACCOUNT; + JsonObject json = new JsonObject(); + if (!TextUtils.isEmpty(memberPhone)) { + json.addProperty("memberPhone", memberPhone);//鎵嬫満鍙� + } + if (!TextUtils.isEmpty(memberPhone)) { + json.addProperty("memberEmail", memberEmail);//閭 + } + json.addProperty("verifyCode", verifyCode);//楠岃瘉鐮� + HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() { + @Override + public void onSuccess(String str) { + if (cloudCallBeak != null) { + cloudCallBeak.onSuccess(true); + } + } + + @Override + public void onFailure(HDLException e) { + if (cloudCallBeak != null) { + cloudCallBeak.onFailure(e); + } + } + }); + + + } + + + /** + * 瑙g粦璁よ瘉(鎵嬫満/閭)(C绔处鍙�) + * + * @param unBindLabel 瑙g粦鏍囪瘑锛圥HONE EMAIL锛� + */ + public void unBindingAccount_C(String unBindLabel, CloudCallBeak<Boolean> cloudCallBeak) { + String requestUrl = HttpApi.C_POST_MEMBERINFO_UNBINDWITHACCOUNT; + JsonObject json = new JsonObject(); + json.addProperty("unBindLabel", unBindLabel);//鎵嬫満鍙凤紙PHONE EMAIL锛� + HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() { + @Override + public void onSuccess(String str) { + if (cloudCallBeak != null) { + cloudCallBeak.onSuccess(true); + } + } + + @Override + public void onFailure(HDLException e) { + if (cloudCallBeak != null) { + cloudCallBeak.onFailure(e); + } + } + }); + + + } + // endregion diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/me/AccountAndSecurityActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/me/AccountAndSecurityActivity.java index 926aa71..48056eb 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/me/AccountAndSecurityActivity.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/me/AccountAndSecurityActivity.java @@ -42,13 +42,13 @@ viewBinding.setAccountPhoneIl.getRoot().setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - + startActivity(BindPhoneActivity.class); } }); viewBinding.setAccountMailIl.getRoot().setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - + startActivity(BindMailActivity.class); } }); diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/me/BindMailActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/me/BindMailActivity.java new file mode 100644 index 0000000..78f1362 --- /dev/null +++ b/app/src/main/java/com/hdl/photovoltaic/ui/me/BindMailActivity.java @@ -0,0 +1,171 @@ +package com.hdl.photovoltaic.ui.me; + + +import android.os.Bundle; +import android.os.CountDownTimer; +import android.text.TextUtils; +import android.view.View; + +import com.hdl.linkpm.sdk.core.exception.HDLException; +import com.hdl.photovoltaic.R; +import com.hdl.photovoltaic.base.CustomBaseActivity; +import com.hdl.photovoltaic.databinding.ActivityBindMailBinding; +import com.hdl.photovoltaic.listener.CloudCallBeak; +import com.hdl.photovoltaic.other.HdlAccountLogic; +import com.hdl.photovoltaic.other.HdlLogLogic; +import com.hdl.photovoltaic.other.HdlThreadLogic; + +/** + * 淇敼缁戝畾閭鐨勭晫闈� + */ +public class BindMailActivity extends CustomBaseActivity { + + private ActivityBindMailBinding viewBinding; + + @Override + public Object getContentView() { + viewBinding = ActivityBindMailBinding.inflate(getLayoutInflater()); + return viewBinding.getRoot(); + } + + @Override + public void onBindView(Bundle savedInstanceState) { + setNotificationBarBackgroundColor(CustomBaseActivity.CustomColor.white); + setStatusBarTextColor(); + //鍒濆鍖� + initView(); + //鍒濆鍖栫晫闈㈢洃鍚櫒 + initEvent(); + + } + + private void initEvent() { + + viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + finish(); + } + }); + + viewBinding.bindMailVerificationCodeRl.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + sendVerification(); + } + }); + + viewBinding.bindMailClearIv.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + viewBinding.bindMailEt.setText(""); + } + }); + viewBinding.bindPhoneTv.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (isLocalCheck()) { + String mailStr = viewBinding.bindMailEt.getText().toString(); + String verificationStr = viewBinding.changeMailVerificationEt.getText().toString(); + HdlAccountLogic.getInstance().bindingAccount_C("", mailStr, verificationStr, new CloudCallBeak<Boolean>() { + @Override + public void onSuccess(Boolean obj) { + HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.set_bind_mail_succeed), 0); + } + + @Override + public void onFailure(HDLException e) { + HdlThreadLogic.tipFlashingBox(_mActivity, false, e.getMsg(), e.getCode()); + } + }); + } + } + }); + + } + + private void initView() { + viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.set_change_bind_mail); + viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setTextColor(getResources().getColor(R.color.text_030D1C, null)); + viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setVisibility(View.VISIBLE); + viewBinding.toolbarTopFragmentHouseListRl.topBarView.setBackgroundColor(getResources().getColor(R.color.text_FFFFFFFF, null)); + } + + /** + * 鍙戦�侀獙璇佺爜鎸囦护 + */ + private void sendVerification() { + + String account = viewBinding.bindMailEt.getText().toString(); + if (TextUtils.isEmpty(account)) { + HdlThreadLogic.tipFlashingBox(this, false, getString(R.string.home_login_mail_null), -1); + return; + } + HdlAccountLogic.getInstance().sendVerifyCode(false, account, "86", 3, new CloudCallBeak<Boolean>() { + @Override + public void onSuccess(Boolean obj) { + countDownTimer.start(); + } + + @Override + public void onFailure(HDLException e) { + HdlThreadLogic.tipFlashingBox(_mActivity, false, e.getMsg(), e.getCode()); + HdlLogLogic.print(e.getMessage(), e.getCode(), true); + } + }); + + } + + /** + * 鍒濆鍖栨墜鏈哄彿璁℃椂鍣� + */ + CountDownTimer countDownTimer = new CountDownTimer(60 * 1000, 1000) { + @Override + public void onTick(long millisUntilFinished) { + long time = (millisUntilFinished / 1000); + String str = time + "s" + getString(R.string.home_login_psw_verification_repeater); + viewBinding.bindMailVerificationTv.setText(str); + viewBinding.bindMailVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000, null)); + viewBinding.bindMailVerificationTv.setEnabled(false); + + } + + @Override + public void onFinish() { + viewBinding.bindMailVerificationTv.setText(getString(R.string.home_login_verification_regain)); + viewBinding.bindMailVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3, null)); + viewBinding.bindMailVerificationTv.setEnabled(true); + + + } + }; + + /** + * 鏈湴鏍¢獙 + */ + private boolean isLocalCheck() { + String phoneStr = viewBinding.bindMailEt.getText().toString(); + String verificationStr = viewBinding.changeMailVerificationEt.getText().toString(); + if (TextUtils.isEmpty(phoneStr)) { + HdlThreadLogic.tipFlashingBox(this, false, getString(R.string.home_login_mail_null), -1); + return false; + } + if (TextUtils.isEmpty(verificationStr)) { + HdlThreadLogic.tipFlashingBox(this, false, getString(R.string.home_login_null_verification_code), -1); + return false; + } + + return true; + + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (countDownTimer != null) { + countDownTimer.cancel(); + countDownTimer = null; + } + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java new file mode 100644 index 0000000..9a3e08c --- /dev/null +++ b/app/src/main/java/com/hdl/photovoltaic/ui/me/BindPhoneActivity.java @@ -0,0 +1,171 @@ +package com.hdl.photovoltaic.ui.me; + + +import android.os.Bundle; +import android.os.CountDownTimer; +import android.text.TextUtils; +import android.view.View; + +import com.hdl.linkpm.sdk.core.exception.HDLException; +import com.hdl.photovoltaic.R; +import com.hdl.photovoltaic.base.CustomBaseActivity; +import com.hdl.photovoltaic.databinding.ActivityBindPhoneBinding; +import com.hdl.photovoltaic.listener.CloudCallBeak; +import com.hdl.photovoltaic.other.HdlAccountLogic; +import com.hdl.photovoltaic.other.HdlLogLogic; +import com.hdl.photovoltaic.other.HdlThreadLogic; + +/** + * 淇敼缁戝畾鎵嬫満鍙风殑鐣岄潰 + */ +public class BindPhoneActivity extends CustomBaseActivity { + + private ActivityBindPhoneBinding viewBinding; + + @Override + public Object getContentView() { + viewBinding = ActivityBindPhoneBinding.inflate(getLayoutInflater()); + return viewBinding.getRoot(); + } + + @Override + public void onBindView(Bundle savedInstanceState) { + setNotificationBarBackgroundColor(CustomColor.white); + setStatusBarTextColor(); + //鍒濆鍖� + initView(); + //鍒濆鍖栫晫闈㈢洃鍚櫒 + initEvent(); + + } + + private void initEvent() { + + viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + finish(); + } + }); + + viewBinding.bindPhoneVerificationCodeRl.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + sendVerification(); + } + }); + + viewBinding.bindPhoneClearIv.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + viewBinding.bindPhoneEt.setText(""); + } + }); + viewBinding.bindPhoneTv.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (isLocalCheck()) { + String phoneStr = viewBinding.bindPhoneEt.getText().toString(); + String verificationStr = viewBinding.changePhoneVerificationEt.getText().toString(); + HdlAccountLogic.getInstance().bindingAccount_C(phoneStr, "", verificationStr, new CloudCallBeak<Boolean>() { + @Override + public void onSuccess(Boolean obj) { + HdlThreadLogic.tipFlashingBox(_mActivity, true, getString(R.string.set_bind_phone_succeed), 0); + } + + @Override + public void onFailure(HDLException e) { + HdlThreadLogic.tipFlashingBox(_mActivity, false, e.getMsg(), e.getCode()); + } + }); + } + } + }); + + } + + private void initView() { + viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.set_change_bind_phone_number); + viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setTextColor(getResources().getColor(R.color.text_030D1C, null)); + viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setVisibility(View.VISIBLE); + viewBinding.toolbarTopFragmentHouseListRl.topBarView.setBackgroundColor(getResources().getColor(R.color.text_FFFFFFFF, null)); + } + + /** + * 鍙戦�侀獙璇佺爜鎸囦护 + */ + private void sendVerification() { + + String account = viewBinding.bindPhoneEt.getText().toString(); + if (TextUtils.isEmpty(account)) { + HdlThreadLogic.tipFlashingBox(this, false, getString(R.string.home_login_phone_null), -1); + return; + } + HdlAccountLogic.getInstance().sendVerifyCode(true, account, "86", 3, new CloudCallBeak<Boolean>() { + @Override + public void onSuccess(Boolean obj) { + countDownTimer.start(); + } + + @Override + public void onFailure(HDLException e) { + HdlThreadLogic.tipFlashingBox(_mActivity, false, e.getMsg(), e.getCode()); + HdlLogLogic.print(e.getMessage(), e.getCode(), true); + } + }); + + } + + /** + * 鍒濆鍖栨墜鏈哄彿璁℃椂鍣� + */ + CountDownTimer countDownTimer = new CountDownTimer(60 * 1000, 1000) { + @Override + public void onTick(long millisUntilFinished) { + long time = (millisUntilFinished / 1000); + String str = time + "s" + getString(R.string.home_login_psw_verification_repeater); + viewBinding.bindPhoneVerificationTv.setText(str); + viewBinding.bindPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_25000000, null)); + viewBinding.bindPhoneVerificationTv.setEnabled(false); + + } + + @Override + public void onFinish() { + viewBinding.bindPhoneVerificationTv.setText(getString(R.string.home_login_verification_regain)); + viewBinding.bindPhoneVerificationTv.setTextColor(getResources().getColor(R.color.text_245EC3, null)); + viewBinding.bindPhoneVerificationTv.setEnabled(true); + + + } + }; + + /** + * 鏈湴鏍¢獙 + */ + private boolean isLocalCheck() { + String phoneStr = viewBinding.bindPhoneEt.getText().toString(); + String verificationStr = viewBinding.changePhoneVerificationEt.getText().toString(); + if (TextUtils.isEmpty(phoneStr)) { + HdlThreadLogic.tipFlashingBox(this, false, getString(R.string.home_login_phone_null), -1); + return false; + } + if (TextUtils.isEmpty(verificationStr)) { + HdlThreadLogic.tipFlashingBox(this, false, getString(R.string.home_login_null_verification_code), -1); + return false; + } + + return true; + + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (countDownTimer != null) { + countDownTimer.cancel(); + countDownTimer = null; + } + + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_bind_mail.xml b/app/src/main/res/layout/activity_bind_mail.xml new file mode 100644 index 0000000..bfd139c --- /dev/null +++ b/app/src/main/res/layout/activity_bind_mail.xml @@ -0,0 +1,185 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".ui.me.BindMailActivity"> + + <include + android:id="@+id/toolbar_top_fragment_house_list_rl" + layout="@layout/toolbar_top_view_52" /> + + <RelativeLayout + android:id="@+id/bind_mail_parent_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_100" + android:layout_marginTop="@dimen/dp_20" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/toolbar_top_fragment_house_list_rl"> + + <TextView + android:id="@+id/bind_mail_title_tv" + android:layout_width="wrap_content" + android:layout_height="@dimen/dp_20" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="@dimen/dp_24" + android:text="@string/home_login_email" + android:textColor="@color/text_65000000" + android:textSize="@dimen/text_14" /> + + <RelativeLayout + android:id="@+id/bind_mail_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_52" + android:layout_below="@+id/bind_mail_title_tv" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="@dimen/dp_8" + android:layout_marginEnd="@dimen/dp_20" + android:background="@drawable/me_change_psw_bj" + + > + + <EditText + android:id="@+id/bind_mail_et" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_23" + android:layout_centerVertical="true" + android:layout_marginStart="@dimen/dp_16" + android:layout_marginEnd="@dimen/dp_60" + android:background="@null" + android:hint="@string/home_login_input_mail" + android:inputType="text" + android:lines="1" + android:maxLines="1" + android:textColor="@color/text_FF000000" + android:textColorHint="@color/text_25000000" + android:textSize="@dimen/text_16" /> + + <ImageView + android:id="@+id/bind_mail_clear_iv" + android:layout_width="@dimen/dp_20" + android:layout_height="@dimen/dp_20" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:layout_marginEnd="@dimen/dp_12" + android:src="@drawable/clear" /> + + <View + android:id="@+id/bind_mail_line_v" + android:layout_width="match_parent" + android:layout_height="0.5dp" + android:layout_alignParentBottom="true" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginEnd="@dimen/dp_20" + android:background="@color/text_E1E1E1" + android:visibility="gone" + + /> + + </RelativeLayout> + </RelativeLayout> + + <RelativeLayout + android:id="@+id/bind_phone_verification_parent_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_100" + android:layout_marginTop="@dimen/dp_24" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/bind_mail_parent_rl"> + + <TextView + android:id="@+id/bind_mail_verification_title_tv" + android:layout_width="wrap_content" + android:layout_height="@dimen/dp_20" + android:layout_marginStart="@dimen/dp_20" + android:text="@string/verification" + android:textColor="@color/text_65000000" + android:textSize="@dimen/text_14" /> + + <!--閭鑾峰彇楠岃瘉鐮�--> + <RelativeLayout + android:id="@+id/bind_mail_verification_code_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_52" + android:layout_below="@+id/bind_mail_verification_title_tv" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="@dimen/dp_8" + android:layout_marginEnd="@dimen/dp_20" + android:background="@drawable/me_change_psw_bj"> + + <TextView + android:id="@+id/bind_mail_verification_tv" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentEnd="true" + android:layout_marginEnd="@dimen/dp_16" + android:gravity="center" + android:paddingStart="@dimen/dp_16" + android:paddingEnd="@dimen/dp_0" + android:text="@string/home_login_send_mail" + android:textColor="@color/text_245EC3" + android:textSize="@dimen/text_14" /> + + <View + android:id="@+id/bind_phone_verification_v" + android:layout_width="0.5dp" + android:layout_height="20dp" + android:layout_alignStart="@+id/bind_mail_verification_tv" + android:layout_centerInParent="true" + android:background="@color/text_E1E1E1" /> + + <EditText + android:id="@+id/change_mail_verification_et" + android:layout_width="@dimen/dp_150" + android:layout_height="match_parent" + android:layout_alignStart="@+id/bind_phone_verification_v" + android:layout_alignParentStart="true" + android:layout_marginStart="@dimen/dp_20" + android:background="@null" + android:hint="@string/home_login_input_verification_code" + android:inputType="text" + android:lines="1" + android:maxLines="1" + android:textColor="@color/text_FF000000" + android:textColorHint="@color/text_25000000" + android:textSize="@dimen/text_16" + + /> + + <View + android:layout_width="match_parent" + android:layout_height="0.5dp" + android:layout_alignParentBottom="true" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginEnd="@dimen/dp_20" + android:background="@color/text_E1E1E1" + android:visibility="gone" + + /> + + + </RelativeLayout> + </RelativeLayout> + + + <!--纭--> + <TextView + android:id="@+id/bind_phone__tv" + android:layout_width="match_parent" + android:layout_height="52dp" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="73dp" + android:layout_marginEnd="@dimen/dp_20" + android:background="@drawable/yesandnocheck" + android:gravity="center" + android:text="@string/home_login_affirm" + android:textColor="@color/text_FFFFFFFF" + android:textSize="18sp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/bind_phone_verification_parent_rl" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_bind_phone.xml b/app/src/main/res/layout/activity_bind_phone.xml new file mode 100644 index 0000000..49044b0 --- /dev/null +++ b/app/src/main/res/layout/activity_bind_phone.xml @@ -0,0 +1,186 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".ui.me.BindPhoneActivity"> + + <include + android:id="@+id/toolbar_top_fragment_house_list_rl" + layout="@layout/toolbar_top_view_52" /> + + <RelativeLayout + android:id="@+id/bind_phone_parent_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_100" + android:layout_marginTop="@dimen/dp_20" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/toolbar_top_fragment_house_list_rl"> + + <TextView + android:id="@+id/bind_phone_title_tv" + android:layout_width="wrap_content" + android:layout_height="@dimen/dp_20" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="@dimen/dp_24" + android:text="@string/home_login_phone" + android:textColor="@color/text_65000000" + android:textSize="@dimen/text_14" /> + + <RelativeLayout + android:id="@+id/bind_phone_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_52" + android:layout_below="@+id/bind_phone_title_tv" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="@dimen/dp_8" + android:layout_marginEnd="@dimen/dp_20" + android:background="@drawable/me_change_psw_bj" + + > + + <EditText + android:id="@+id/bind_phone_et" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_23" + android:layout_centerVertical="true" + android:layout_marginStart="@dimen/dp_16" + android:layout_marginEnd="@dimen/dp_60" + android:background="@null" + android:hint="@string/home_login_input_phone" + android:inputType="number" + android:lines="1" + android:maxLines="1" + android:textColor="@color/text_FF000000" + android:textColorHint="@color/text_25000000" + android:textSize="@dimen/text_16" /> + + <ImageView + android:id="@+id/bind_phone_clear_iv" + android:layout_width="@dimen/dp_20" + android:layout_height="@dimen/dp_20" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:layout_marginEnd="@dimen/dp_12" + android:src="@drawable/clear" /> + + <View + android:id="@+id/bind_phone_line_v" + android:layout_width="match_parent" + android:layout_height="0.5dp" + android:layout_alignParentBottom="true" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginEnd="@dimen/dp_20" + android:background="@color/text_E1E1E1" + android:visibility="gone" + + /> + + </RelativeLayout> + </RelativeLayout> + + <RelativeLayout + android:id="@+id/bind_phone_verification_parent_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_100" + android:layout_marginTop="@dimen/dp_24" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/bind_phone_parent_rl"> + + <TextView + android:id="@+id/bind_phone_verification_title_tv" + android:layout_width="wrap_content" + android:layout_height="@dimen/dp_20" + android:layout_marginStart="@dimen/dp_20" + android:text="@string/verification" + android:textColor="@color/text_65000000" + android:textSize="@dimen/text_14" /> + + <!--鎵嬫満鑾峰彇楠岃瘉鐮�--> + <RelativeLayout + android:id="@+id/bind_phone_verification_code_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_52" + android:layout_below="@+id/bind_phone_verification_title_tv" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="@dimen/dp_8" + android:layout_marginEnd="@dimen/dp_20" + android:background="@drawable/me_change_psw_bj"> + + <TextView + android:id="@+id/bind_phone_verification_tv" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentEnd="true" + android:layout_marginEnd="@dimen/dp_16" + android:gravity="center" + android:paddingStart="@dimen/dp_16" + android:paddingEnd="@dimen/dp_0" + android:text="@string/home_login_verification_code" + android:textColor="@color/text_245EC3" + android:textSize="@dimen/text_14" /> + + <View + android:id="@+id/bind_phone_verification_v" + android:layout_width="0.5dp" + android:layout_height="20dp" + android:layout_alignStart="@+id/bind_phone_verification_tv" + android:layout_centerInParent="true" + android:background="@color/text_E1E1E1" /> + + <EditText + android:id="@+id/change_phone_verification_et" + android:layout_width="@dimen/dp_150" + android:layout_height="match_parent" + android:layout_alignStart="@+id/bind_phone_verification_v" + android:layout_alignParentStart="true" + android:layout_marginStart="@dimen/dp_20" + android:background="@null" + android:hint="@string/home_login_input_verification_code" + android:inputType="text" + android:lines="1" + android:maxLines="1" + android:textColor="@color/text_FF000000" + android:textColorHint="@color/text_25000000" + android:textSize="@dimen/text_16" + + /> + + <View + android:layout_width="match_parent" + android:layout_height="0.5dp" + android:layout_alignParentBottom="true" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginEnd="@dimen/dp_20" + android:background="@color/text_E1E1E1" + android:visibility="gone" + + /> + + + </RelativeLayout> + </RelativeLayout> + + + <!--纭--> + <TextView + android:id="@+id/bind_phone__tv" + android:layout_width="match_parent" + android:layout_height="52dp" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="73dp" + android:layout_marginEnd="@dimen/dp_20" + android:background="@drawable/yesandnocheck" + android:gravity="center" + android:text="@string/home_login_affirm" + android:textColor="@color/text_FFFFFFFF" + android:textSize="18sp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/bind_phone_verification_parent_rl" /> + + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cba05cf..b6d0c9f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -61,6 +61,7 @@ <string name="home_login_input_affirm_psw">璇峰啀娆¤緭鍏ユ柊瀵嗙爜</string> <string name="home_login_input_unlike_psw">鏂板瘑鐮佸拰纭瀵嗙爜涓嶄竴鑷�.</string> <string name="home_login_change_name_succeed">淇敼澶囨敞鎴愬姛.</string> + <string name="verification">楠岃瘉鐮�</string> <!--鎴戠殑鐢电珯--> @@ -121,6 +122,10 @@ <string name="set_language_choice">璇█閫夋嫨</string> <string name="set_c">C(鎽勬皬搴�)</string> <string name="set_f">F(鍗庢皬搴�)</string> + <string name="set_change_bind_phone_number">淇敼鎵嬫満鍙风爜</string> + <string name="set_change_bind_mail">淇敼閭鍦板潃</string> + <string name="set_bind_phone_succeed">缁戝畾鎵嬫満鍙锋垚鍔�.</string> + <string name="set_bind_mail_succeed">缁戝畾閭鎴愬姛.</string> <!--app鏇存柊--> -- Gitblit v1.8.0