Commit e3aa08dc authored by linfeng's avatar linfeng

Merge branch 'dev_im' of http://113.105.137.151:22280/lify/rvapp

parents bae81ddf 84e5c9a2
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion rootProject.ext.buildToolsVersion
...@@ -77,7 +76,6 @@ android { ...@@ -77,7 +76,6 @@ android {
//api 'com.just.agentweb:filechooser:4.0.3-beta' //api 'com.just.agentweb:filechooser:4.0.3-beta'
//api 'com.just.agentweb:download:4.0.3-beta' //api 'com.just.agentweb:download:4.0.3-beta'
//百度定位 //百度定位
api files('libs/BaiduLBS_Android.jar') api files('libs/BaiduLBS_Android.jar')
//bugly //bugly
......
...@@ -32,6 +32,7 @@ public class PickerPresenter extends CommonPresenter { ...@@ -32,6 +32,7 @@ public class PickerPresenter extends CommonPresenter {
public final int TYPE_CAMERA_CROP_CODE = 1003;//照相并裁剪 public final int TYPE_CAMERA_CROP_CODE = 1003;//照相并裁剪
public final int TYPE_ALBUM_CROP_CODE = 1004;//相册并裁剪 public final int TYPE_ALBUM_CROP_CODE = 1004;//相册并裁剪
public final int TYPE_CROP_CODE = 1005;//裁剪后的结果 public final int TYPE_CROP_CODE = 1005;//裁剪后的结果
private String cameraUrl; private String cameraUrl;
private File imageFile; private File imageFile;
private Uri cropUri; private Uri cropUri;
......
package com.ruiwenliu.wrapper.bean; package com.ruiwenliu.wrapper.bean;
import com.google.gson.annotations.SerializedName;
import com.ruiwenliu.wrapper.base.BaseBean; import com.ruiwenliu.wrapper.base.BaseBean;
import java.io.Serializable; import java.io.Serializable;
...@@ -46,8 +45,14 @@ public class UserInfoBean extends BaseBean implements Serializable { ...@@ -46,8 +45,14 @@ public class UserInfoBean extends BaseBean implements Serializable {
private String wxOpenid; private String wxOpenid;
//微信unionid //微信unionid
private String unionid; private String unionid;
// 微信
private String wxNickname ;
//qq //qq
private String openid; private String openid;
// QQ昵称
private String qqNickname ;
// 支付宝昵称
private String aliPayNickName ;
//状态:0-启用,1-禁用 //状态:0-启用,1-禁用
private Integer status; private Integer status;
//身份证号 //身份证号
...@@ -85,6 +90,10 @@ public class UserInfoBean extends BaseBean implements Serializable { ...@@ -85,6 +90,10 @@ public class UserInfoBean extends BaseBean implements Serializable {
private String positionName;// 职位名称 private String positionName;// 职位名称
private boolean isBindAliPay; //是否绑定支付宝
private boolean isBindWx ; // 是否绑定过微信
private boolean isBindQQ ; // 是否绑定过QQ;
public Integer getId() { public Integer getId() {
return id; return id;
...@@ -301,5 +310,53 @@ public class UserInfoBean extends BaseBean implements Serializable { ...@@ -301,5 +310,53 @@ public class UserInfoBean extends BaseBean implements Serializable {
public void setBigIcon(String bigIcon) { public void setBigIcon(String bigIcon) {
this.bigIcon = bigIcon; this.bigIcon = bigIcon;
} }
public boolean isBindAliPay() {
return isBindAliPay;
}
public void setBindAliPay(boolean bindAliPay) {
isBindAliPay = bindAliPay;
}
public String getWxNickname() {
return wxNickname;
}
public void setWxNickname(String wxNickname) {
this.wxNickname = wxNickname;
}
public String getQqNickname() {
return qqNickname;
}
public void setQqNickname(String qqNickname) {
this.qqNickname = qqNickname;
}
public String getAliPayNickName() {
return aliPayNickName;
}
public void setAliPayNickName(String aliPayNickName) {
this.aliPayNickName = aliPayNickName;
}
public boolean isBindWx() {
return isBindWx;
}
public void setBindWx(boolean bindWx) {
isBindWx = bindWx;
}
public boolean isBindQQ() {
return isBindQQ;
}
public void setBindQQ(boolean bindQQ) {
isBindQQ = bindQQ;
}
} }
} }
...@@ -41,4 +41,24 @@ public class IsAppInstall { ...@@ -41,4 +41,24 @@ public class IsAppInstall {
} }
return false; return false;
} }
/**
* 判断qq是否可用
*
* @param context
* @return
*/
public static boolean isZfbClientAvailable(Context context) {
final PackageManager packageManager = context.getPackageManager();
List<PackageInfo> pinfo = packageManager.getInstalledPackages(0);
if (pinfo != null) {
for (int i = 0; i < pinfo.size(); i++) {
String pn = pinfo.get(i).packageName;
if (pn.equals("com.eg.android.AlipayGphone")) {
return true;
}
}
}
return false;
}
} }
...@@ -163,4 +163,10 @@ public class ApiConfig { ...@@ -163,4 +163,10 @@ public class ApiConfig {
public static String HTTP_URL_PRICE_BASEORDER = RvFrameConfig.HOST + "/api/order/baseOrder/"; public static String HTTP_URL_PRICE_BASEORDER = RvFrameConfig.HOST + "/api/order/baseOrder/";
public static String HTTP_URL_PRERENT_DAYS = RvFrameConfig.HOST + "/api/app/cofig/app/unauth/types?types=999"; public static String HTTP_URL_PRERENT_DAYS = RvFrameConfig.HOST + "/api/app/cofig/app/unauth/types?types=999";
public static String HTTP_URL_CHECK_MOBILE_CODE = RvFrameConfig.HOST + "/api/admin/api/app/unauth/checkMobilecode";
public static String HTTP_URL_UPDATE_PHONE = RvFrameConfig.HOST + "/api/auth/jwt/updUsername";
public static String HTTP_URL_USER_BIND = RvFrameConfig.HOST + "/api/admin/app/user/bind";
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
package="com.rv.rvmine"> package="com.rv.rvmine">
<application> <application>
<activity android:name=".fragment.MyReleasePatFragment"></activity> <activity android:name=".fragment.MyReleasePatFragment" />
<activity <activity
android:name=".personal.IDCardCertificationShowActivity" android:name=".personal.IDCardCertificationShowActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
<activity <activity
android:name=".traveler.MyReleaseActivity" android:name=".traveler.MyReleaseActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity android:name="com.rv.version.activity.UpdateAppActivity" /> <activity android:name=".traveler.AccountSafeActivity" />
<activity android:name=".traveler.BindPhoneActivity" />
<activity android:name=".traveler.AlterNickNameActivity"></activity>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -4,10 +4,15 @@ import android.annotation.SuppressLint; ...@@ -4,10 +4,15 @@ import android.annotation.SuppressLint;
import android.app.ActivityOptions; import android.app.ActivityOptions;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.ForegroundColorSpan;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
...@@ -93,7 +98,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -93,7 +98,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
TextView tvLogin; TextView tvLogin;
@BindView(R2.id.tv_verified) @BindView(R2.id.tv_verified)
TextView tvVerified; TextView tvVerified;
// @BindView(R2.id.tv_membership_level) // @BindView(R2.id.tv_membership_level)
// TextView tvMembershipLevel; // TextView tvMembershipLevel;
@BindView(R2.id.tv_member_hint) @BindView(R2.id.tv_member_hint)
TextView tvMemberHint; TextView tvMemberHint;
...@@ -115,14 +120,16 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -115,14 +120,16 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
Banner mineBanner; Banner mineBanner;
@BindView(R2.id.refresh) @BindView(R2.id.refresh)
SimpleRefreshLayout mSimpleRefreshLayout; SimpleRefreshLayout mSimpleRefreshLayout;
@BindView(R2.id.tv_user_identity) // @BindView(R2.id.tv_user_identity)
TextView tvUserIdentity; // TextView tvUserIdentity;
@BindView(R2.id.tv_integral) @BindView(R2.id.tv_integral)
TextView tvIntegral; TextView tvIntegral;
@BindView(R2.id.tv_wallet) @BindView(R2.id.tv_wallet)
TextView tvWallet; TextView tvWallet;
@BindView(R2.id.tv_coupon) @BindView(R2.id.tv_coupon)
TextView tvCoupon; TextView tvCoupon;
@BindView(R2.id.tv_capacity)
TextView tvCapacity;
private UserInfoBean.UserInfo info; private UserInfoBean.UserInfo info;
...@@ -149,14 +156,14 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -149,14 +156,14 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
if (TextUtils.isEmpty(OkGoUtil.getToken())) { if (TextUtils.isEmpty(OkGoUtil.getToken())) {
tvNickname.setVisibility(View.GONE); tvNickname.setVisibility(View.GONE);
((View) ivMember.getParent()).setVisibility(View.GONE); ((View) ivMember.getParent().getParent()).setVisibility(View.GONE);
tvLogin.setVisibility(View.VISIBLE); tvLogin.setVisibility(View.VISIBLE);
tvVerified.setVisibility(View.GONE); tvVerified.setVisibility(View.GONE);
tvViewPrivileges.setText("查看会员特权"); tvViewPrivileges.setText("查看会员特权");
mSimpleRefreshLayout.setPullDownEnable(false); mSimpleRefreshLayout.setPullDownEnable(false);
} else { } else {
tvNickname.setVisibility(View.VISIBLE); tvNickname.setVisibility(View.VISIBLE);
((View) ivMember.getParent()).setVisibility(View.VISIBLE); ((View) ivMember.getParent().getParent()).setVisibility(View.VISIBLE);
// ivMember.setVisibility(View.VISIBLE); // ivMember.setVisibility(View.VISIBLE);
tvLogin.setVisibility(View.GONE); tvLogin.setVisibility(View.GONE);
tvVerified.setVisibility(View.VISIBLE); tvVerified.setVisibility(View.VISIBLE);
...@@ -172,7 +179,6 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -172,7 +179,6 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
setMember(userInfo); setMember(userInfo);
} }
} }
private void initRefresh() { private void initRefresh() {
...@@ -256,7 +262,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -256,7 +262,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
@OnClick({R2.id.iv_avatar, R2.id.tv_login, R2.id.tv_verified, R2.id.rl_item_to_be_paid, R2.id.rl_item_staying, R2.id.iv_item_message, @OnClick({R2.id.iv_avatar, R2.id.tv_login, R2.id.tv_verified, R2.id.rl_item_to_be_paid, R2.id.rl_item_staying, R2.id.iv_item_message,
R2.id.rl_item_traveling, R2.id.rl_item_completed, R2.id.rl_item_collection, R2.id.rl_item_my_release, R2.id.rl_item_traveling, R2.id.rl_item_completed, R2.id.rl_item_collection, R2.id.rl_item_my_release,
R2.id.iv_item_setting, R2.id.ll_item_view_privileges, R2.id.rl_item_order_all, R2.id.ll_item_integral, R2.id.ll_item_wallet, R2.id.iv_item_setting, R2.id.ll_item_view_privileges, R2.id.rl_item_order_all, R2.id.ll_item_integral, R2.id.ll_item_wallet,
R2.id.ll_item_coupon, R2.id.ll_item_promotion, R2.id.rl_item_check_in, R2.id.rl_item_travel_management}) R2.id.ll_item_coupon, R2.id.ll_item_promotion, R2.id.rl_item_check_in, R2.id.rl_item_travel_management,R2.id.tv_nickname})
public void onViewClicked(View view) { public void onViewClicked(View view) {
int id = view.getId(); int id = view.getId();
if (id == R.id.iv_item_setting) { if (id == R.id.iv_item_setting) {
...@@ -267,7 +273,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -267,7 +273,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
if (isLogin()) return; if (isLogin()) return;
showToast("该功能还在开发中。。。"); showToast("该功能还在开发中。。。");
} else if (id == R.id.iv_avatar) { } else if (id == R.id.iv_avatar || id == R.id.tv_nickname) {
//头像 //头像
if (isLogin()) return; if (isLogin()) return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
...@@ -384,16 +390,21 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -384,16 +390,21 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
ivAvatar.setBackgroundResource(0); ivAvatar.setBackgroundResource(0);
ivAvatar.setImageResource(R.drawable.common_icon_avatar_default); ivAvatar.setImageResource(R.drawable.common_icon_avatar_default);
tvNickname.setVisibility(View.GONE); tvNickname.setVisibility(View.GONE);
((View) ivMember.getParent()).setVisibility(View.GONE); ((View) ivMember.getParent().getParent()).setVisibility(View.GONE);
// ivMember.setVisibility(View.GONE); // ivMember.setVisibility(View.GONE);
tvLogin.setVisibility(View.VISIBLE); tvLogin.setVisibility(View.VISIBLE);
tvVerified.setVisibility(View.GONE); tvVerified.setVisibility(View.GONE);
tvUserIdentity.setVisibility(View.GONE); // tvUserIdentity.setVisibility(View.GONE);
tvViewPrivileges.setText("查看会员特权"); tvViewPrivileges.setText("查看会员特权");
// tvMembershipLevel.setText("会员中心"); // tvMembershipLevel.setText("会员中心");
tvMemberHint.setText("免费用车- -天"); tvMemberHint.setText("免费用车- -天");
tvIntegral.setText("0"); tvIntegral.setText("0");
tvWallet.setText("0"); SpannableString s = new SpannableString("¥ 0");
s.setSpan(new AbsoluteSizeSpan(10, true), 0, 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
s.setSpan(new AbsoluteSizeSpan(20, true), 1, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
s.setSpan(new ForegroundColorSpan(Color.parseColor("#171413")), 0, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
tvWallet.setText(s);
tvCoupon.setText("0"); tvCoupon.setText("0");
mSimpleRefreshLayout.setPullDownEnable(false); mSimpleRefreshLayout.setPullDownEnable(false);
} }
...@@ -522,7 +533,12 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -522,7 +533,12 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
private void profitData(InfoProfitBean bean) { private void profitData(InfoProfitBean bean) {
if (bean != null && bean.getData() != null) { if (bean != null && bean.getData() != null) {
tvIntegral.setText(bean.getData().getTotalPoint()); tvIntegral.setText(bean.getData().getTotalPoint());
tvWallet.setText(bean.getData().getBalance()); SpannableString s = new SpannableString("¥ "+bean.getData().getBalance());
s.setSpan(new AbsoluteSizeSpan(10, true), 0, 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
s.setSpan(new AbsoluteSizeSpan(20, true), 1, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
s.setSpan(new ForegroundColorSpan(Color.parseColor("#171413")), 0, s.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
tvWallet.setText(s);
tvCoupon.setText(bean.getData().getCouponNumber()); tvCoupon.setText(bean.getData().getCouponNumber());
} }
} }
...@@ -534,6 +550,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -534,6 +550,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
if (info != null) { if (info != null) {
GlideManager.getInstance(_mActivity).loadImage(info.getHeadimgurl(), ivAvatar); GlideManager.getInstance(_mActivity).loadImage(info.getHeadimgurl(), ivAvatar);
tvNickname.setText(info.getNickname()); tvNickname.setText(info.getNickname());
tvCapacity.setText(info.getPositionName());
//更新实名信息 //更新实名信息
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_USERINFO, JSON.toJSONString(info)).commit(); UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_USERINFO, JSON.toJSONString(info)).commit();
if (info.getCertificationStatus() == 0) { //实名认证状态:0-未认证,1-已认证 if (info.getCertificationStatus() == 0) { //实名认证状态:0-未认证,1-已认证
...@@ -548,26 +565,25 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -548,26 +565,25 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
} else { } else {
ivMember.setVisibility(View.GONE); ivMember.setVisibility(View.GONE);
} }
if (TextUtils.isEmpty(info.getPositionName())) { // if (TextUtils.isEmpty(info.getPositionName())) {
tvUserIdentity.setVisibility(View.GONE); // tvUserIdentity.setVisibility(View.GONE);
} else { // } else {
tvUserIdentity.setText(info.getPositionName()); // tvUserIdentity.setText(info.getPositionName());
tvUserIdentity.setVisibility(View.VISIBLE); // tvUserIdentity.setVisibility(View.VISIBLE);
//
} // }
setMember(info); setMember(info);
} }
if (TextUtils.isEmpty(OkGoUtil.getToken())) { if (TextUtils.isEmpty(OkGoUtil.getToken())) {
tvNickname.setVisibility(View.GONE); tvNickname.setVisibility(View.GONE);
((View) ivMember.getParent()).setVisibility(View.GONE); ((View) ivMember.getParent().getParent()).setVisibility(View.GONE);
// ivMember.setVisibility(View.GONE); // ivMember.setVisibility(View.GONE);
tvLogin.setVisibility(View.VISIBLE); tvLogin.setVisibility(View.VISIBLE);
tvVerified.setVisibility(View.GONE); tvVerified.setVisibility(View.GONE);
} else { } else {
tvNickname.setVisibility(View.VISIBLE); tvNickname.setVisibility(View.VISIBLE);
((View) ivMember.getParent()).setVisibility(View.VISIBLE); ((View) ivMember.getParent().getParent()).setVisibility(View.VISIBLE);
// ivMember.setVisibility(View.VISIBLE); // ivMember.setVisibility(View.VISIBLE);
tvLogin.setVisibility(View.GONE); tvLogin.setVisibility(View.GONE);
tvVerified.setVisibility(View.VISIBLE); tvVerified.setVisibility(View.VISIBLE);
......
package com.rv.rvmine;
public interface SwitchFragmentListener {
void setTitle(String title) ;
void next();
void changeSuccess(String phone);
}
package com.rv.rvmine.bean;
public class AccountBindDto {
private String openId;
private String unionId;
private String nickName;
private String type;
private String code;
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getUnionId() {
return unionId;
}
public void setUnionId(String unionId) {
this.unionId = unionId;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public AccountBindDto(String openId, String unionId, String nickName, String type, String code) {
this.openId = openId;
this.unionId = unionId;
this.nickName = nickName;
this.type = type;
this.code = code;
}
public AccountBindDto(String openId, String unionId, String nickName, String type) {
this.openId = openId;
this.unionId = unionId;
this.nickName = nickName;
this.type = type;
}
}
package com.rv.rvmine.bean;
import com.ruiwenliu.wrapper.base.BaseBean;
public class BindCallBackBean extends BaseBean {
private String data ;
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}
package com.rv.rvmine.fragment;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment;
import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.rv.rvmine.R;
import com.rv.rvmine.R2;
import com.rv.rvmine.SwitchFragmentListener;
import butterknife.BindView;
public class BindPhoneFirstFragment extends BaseFragment<CommonPresenter> {
@BindView(R2.id.tv_phone)
TextView tvPhone;
@BindView(R2.id.btn_update_phone)
Button btnUpdatePhone;
private String phone;
@Override
public int getViewLayout() {
return R.layout.fragment_bind_phone_first;
}
@Override
protected void initView(Bundle savedInstanceState) {
((SwitchFragmentListener) _mActivity).setTitle("绑定手机号");
phone = getArguments().getString("phone");
if (!TextUtils.isEmpty(phone))
tvPhone.setText(phone);
btnUpdatePhone.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((SwitchFragmentListener) _mActivity).next();
}
});
}
@Override
protected void loadData(Bundle savedInstanceState) {
}
@Override
public void onShowResult(int requestType, BaseBean result) {
}
}
package com.rv.rvmine.fragment;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.base.utils.tools.android.NetworkUtil;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment;
import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.ruiwenliu.wrapper.util.RxJavaManager;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.ui.login.bean.SendCodeBean;
import com.rv.rvmine.R;
import com.rv.rvmine.R2;
import com.rv.rvmine.SwitchFragmentListener;
import java.util.LinkedHashMap;
import java.util.Map;
import butterknife.BindView;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
public class BindPhoneSecondFragment extends BaseFragment<CommonPresenter> {
@BindView(R2.id.tv_phone)
TextView tvPhone;
@BindView(R2.id.tv_get_code)
TextView tvGetCode;
@BindView(R2.id.et_phone_code)
EditText etPhoneCode;
@BindView(R2.id.btn_next)
Button btnNext;
private String phone;
private Disposable mDisposable;
@Override
public int getViewLayout() {
return R.layout.fragment_bind_phone_second;
}
@Override
protected void initView(Bundle savedInstanceState) {
((SwitchFragmentListener) _mActivity).setTitle("验证手机号");
phone = getArguments().getString("phone");
if (!TextUtils.isEmpty(phone))
tvPhone.setText(phone);
etPhoneCode.addTextChangedListener(watcher);
tvGetCode.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (TextUtils.isEmpty(getPhone())) {
showToast(getString(com.rv.home.R.string.rv_phone_hint));
return;
}
if (getPhone().length() != 11) {
showToast("手机号码不正确");
return;
}
sendCode();
}
});
btnNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (TextUtils.isEmpty(getPhone()) || getPhone().length() != 11) {
showToast("手机号码不正确");
return;
}
if (TextUtils.isEmpty(getCode())) {
showToast("短信验证码为空");
return;
}
checkMobilecode();
}
});
}
/**
* 获得手机号
*
* @return
*/
private String getPhone() {
return phone;
}
private String getCode() {
return etPhoneCode.getText().toString().trim();
}
/**
* 发送验证码
*/
private void sendCode() {
Map<String, Object> map = new LinkedHashMap<>();
map.put("username", getPhone());
map.put("type", 4);
mPresenter.postData(0, ApiConfig.HTTP_URL_SEND_CODE, SendCodeBean.class, map, true);
}
/**
* 发送验证码
*/
private void checkMobilecode() {
Map<String, Object> map = new LinkedHashMap<>();
map.put("phone", getPhone());
map.put("mobilecode", getCode());
mPresenter.getData(1, ApiConfig.HTTP_URL_CHECK_MOBILE_CODE, BaseBean.class, map, true);
}
@Override
protected void loadData(Bundle savedInstanceState) {
}
@Override
public void onShowResult(int requestType, BaseBean result) {
if (requestType == 0) {
showToast(getString(com.rv.home.R.string.rv_phone_code_toast));
sendCode(60);
} else if (requestType == 1) {
((SwitchFragmentListener) _mActivity).next();
}
}
@Override
public void onShowError(String errorMsg, int errorType) {
if (getContext() != null && !NetworkUtil.isNetworkAvailable(getContext())) {
showToast("网络异常,请检察您的网络");
return;
}
if (!TextUtils.isEmpty(errorMsg))
showToast(errorMsg);
}
/**
* 发送验证码
*
* @param timeLong 验证码时长
*/
private void sendCode(final int timeLong) {
RxJavaManager.getInstance().sendCode(timeLong, new Consumer<Disposable>() {
@Override
public void accept(Disposable disposable) throws Exception {
tvGetCode.setEnabled(false);
}
}, new Observer<Long>() {
@Override
public void onSubscribe(Disposable d) {
mDisposable = d;
}
@Override
public void onNext(Long aLong) {
tvGetCode.setText("" + aLong + "s");
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
tvGetCode.setEnabled(true);
tvGetCode.setText(getString(com.rv.home.R.string.rv_login_rest));
}
});
}
/**
* 停止计时
*/
public void stopCarousel() {
if (mDisposable != null && !mDisposable.isDisposed()) {
mDisposable.dispose();
}
}
@Override
public void onStop() {
super.onStop();
stopCarousel();
}
private TextWatcher watcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (!TextUtils.isEmpty(getCode()) && getCode().length() >= 4) {
btnNext.setBackgroundResource(R.drawable.shape_rv_bg_fdc349);
} else {
btnNext.setBackgroundResource(R.drawable.shape_rv_bg_fde6b5);
}
}
@Override
public void afterTextChanged(Editable s) {
}
};
}
package com.rv.rvmine.fragment;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.base.utils.tools.android.NetworkUtil;
import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment;
import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.ruiwenliu.wrapper.util.RxJavaManager;
import com.rv.component.utils.DateUtils;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.ui.login.bean.SendCodeBean;
import com.rv.rvmine.R;
import com.rv.rvmine.R2;
import com.rv.rvmine.SwitchFragmentListener;
import com.rv.rvmine.bean.BindCallBackBean;
import com.yuyife.okgo.OkGoUtil;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import butterknife.BindView;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
public class BindPhoneThirdFragment extends BaseFragment<CommonPresenter> {
@BindView(R2.id.et_phone)
EditText etPhone;
@BindView(R2.id.et_phone_code)
EditText etPhoneCode;
@BindView(R2.id.tv_get_code)
TextView tvGetCode;
@BindView(R2.id.btn_next)
Button btnNext;
private String oldPhone;
private Disposable mDisposable;
@Override
public int getViewLayout() {
return R.layout.fragment_bind_phone_third;
}
@Override
protected void initView(Bundle savedInstanceState) {
oldPhone = getArguments().getString("phone");
((SwitchFragmentListener) _mActivity).setTitle("验证手机号");
etPhoneCode.addTextChangedListener(watcher);
etPhone.addTextChangedListener(watcher);
tvGetCode.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// 获取短信验证码
if (TextUtils.isEmpty(getPhone())) {
showToast(getString(com.rv.home.R.string.rv_phone_hint));
return;
}
if (getPhone().length() != 11) {
showToast("手机号码不正确");
return;
}
if (getPhone().equals(oldPhone)) {
showToast("新号码不能与旧号码一样");
return;
}
sendCode();
}
});
btnNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (TextUtils.isEmpty(getPhone()) || getPhone().length() != 11) {
showToast("手机号码不正确");
return;
}
if (TextUtils.isEmpty(getCode())) {
showToast("短信验证码为空");
return;
}
updateMobile();
// ((SwitchFragmentListener) _mActivity).changeSuccess(oldPhone);
}
});
}
@Override
protected void loadData(Bundle savedInstanceState) {
}
@Override
public void onShowResult(int requestType, BaseBean result) {
if (requestType == 0) {
showToast(getString(com.rv.home.R.string.rv_phone_code_toast));
sendCode(60);
} else if (requestType == 1) {
showToast("手机号更改成功");
BindCallBackBean bean = (BindCallBackBean) result;
if (!TextUtils.isEmpty(bean.getData()))
OkGoUtil.setToken(bean.getData(), DateUtils.getCurDate());
((SwitchFragmentListener) _mActivity).changeSuccess(getPhone());
}
}
@Override
public void onShowError(String errorMsg, int errorType) {
if (getContext() != null && !NetworkUtil.isNetworkAvailable(getContext())) {
showToast("网络异常,请检察您的网络");
return;
}
if (!TextUtils.isEmpty(errorMsg))
showToast(errorMsg);
}
/**
* 获得手机号
*
* @return
*/
private String getPhone() {
return etPhone.getText().toString().trim();
}
private String getCode() {
return etPhoneCode.getText().toString().trim();
}
/**
* 发送验证码
*
* @param timeLong 验证码时长
*/
private void sendCode(final int timeLong) {
RxJavaManager.getInstance().sendCode(timeLong, new Consumer<Disposable>() {
@Override
public void accept(Disposable disposable) throws Exception {
tvGetCode.setEnabled(false);
}
}, new Observer<Long>() {
@Override
public void onSubscribe(Disposable d) {
mDisposable = d;
}
@Override
public void onNext(Long aLong) {
tvGetCode.setText("" + aLong + "s");
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
tvGetCode.setEnabled(true);
tvGetCode.setText(getString(com.rv.home.R.string.rv_login_rest));
}
});
}
/**
* 发送验证码
*/
private void sendCode() {
Map<String, Object> map = new LinkedHashMap<>();
map.put("username", getPhone());
mPresenter.postData(0, ApiConfig.HTTP_URL_SEND_CODE, SendCodeBean.class, map, true);
}
private void updateMobile() {
if (!TextUtils.isEmpty(OkGoUtil.getToken())) {
Map<String, String> head = new HashMap<>();
head.put("Authorization", OkGoUtil.getToken());
Map<String, String> body = new HashMap<>();
body.put("username", getPhone());
body.put("mobilecode", getCode());
mPresenter.postData(RvFrameConfig.HOST, 1, ApiConfig.HTTP_URL_UPDATE_PHONE, BindCallBackBean.class, body, head, true);
}
}
/**
* 停止计时
*/
public void stopCarousel() {
if (mDisposable != null && !mDisposable.isDisposed()) {
mDisposable.dispose();
}
}
@Override
public void onStop() {
super.onStop();
stopCarousel();
}
private TextWatcher watcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (!TextUtils.isEmpty(getPhone()) && getPhone().length() == 11 && !TextUtils.isEmpty(getCode()) && getCode().length() >= 4) {
btnNext.setBackgroundResource(R.drawable.shape_rv_bg_fdc349);
} else {
btnNext.setBackgroundResource(R.drawable.shape_rv_bg_fde6b5);
}
}
@Override
public void afterTextChanged(Editable s) {
}
};
}
package com.rv.rvmine.traveler;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.rvmine.R;
import com.rv.rvmine.R2;
import butterknife.BindView;
public class AlterNickNameActivity extends BaseStatusActivity<CommonPresenter> {
@BindView(R2.id.et_nickname)
EditText etNickname;
@Override
protected int setLayout() {
return R.layout.activity_alter_nick_name;
}
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("个人资料");
titleView.setText(R.id.tv_title_right, "保存");
titleView.setTextColor(R.id.tv_title_right, Color.parseColor("#666666"));
titleView.setChildClickListener(R.id.tv_title_right, new View.OnClickListener() {
@Override
public void onClick(View v) {
upUserinfo();
}
});
String nickName = intent.getStringExtra("nick");
if (!TextUtils.isEmpty(nickName)) {
etNickname.setText(nickName);
if (nickName.length() <= 32) {
etNickname.setSelection(nickName.length());
} else {
etNickname.setSelection(32);
}
}
}
private void upUserinfo() {
if (TextUtils.isEmpty(getNickName())) {
showToast("昵称不能为空");
}
Intent intent = new Intent();
intent.putExtra("nick", getNickName());
setResult(RESULT_OK, intent);
finish();
}
private String getNickName() {
return etNickname.getText().toString().trim();
}
@Override
public void onShowResult(int requestType, BaseBean result) {
}
}
package com.rv.rvmine.traveler;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.KeyEvent;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.ruiwenliu.wrapper.bean.UserInfoBean;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.CacheEnum;
import com.rv.component.utils.RvCache;
import com.rv.rvmine.R;
import com.rv.rvmine.SwitchFragmentListener;
import com.rv.rvmine.fragment.BindPhoneFirstFragment;
import com.rv.rvmine.fragment.BindPhoneSecondFragment;
import com.rv.rvmine.fragment.BindPhoneThirdFragment;
public class BindPhoneActivity extends BaseStatusActivity<CommonPresenter> implements SwitchFragmentListener {
private int currentPage = 1;
private UserInfoBean bean;
private BindPhoneFirstFragment firstFragment;
private BindPhoneSecondFragment secondFragment;
private BindPhoneThirdFragment thirdFragment;
private boolean isChanged;
@Override
protected int setLayout() {
return R.layout.activity_bind_phone;
}
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
bean = (UserInfoBean) intent.getSerializableExtra("user");
firstFragment = new BindPhoneFirstFragment();
if (bean != null) {
Bundle bundle = new Bundle();
bundle.putString("phone", bean.getData().getUsername());
firstFragment.setArguments(bundle);
}
getSupportFragmentManager().beginTransaction().replace(R.id.fl_content, firstFragment)
.addToBackStack(null).commit();
}
@Override
public void onShowResult(int requestType, BaseBean result) {
}
@Override
public void setTitle(String title) {
if (!TextUtils.isEmpty(title))
titleView.setTitle(title);
}
@Override
public void next() {
switch (currentPage) {
case 1:
secondFragment = new BindPhoneSecondFragment();
if (bean != null) {
Bundle bundle = new Bundle();
bundle.putString("phone", bean.getData().getUsername());
secondFragment.setArguments(bundle);
}
getSupportFragmentManager().beginTransaction().replace(R.id.fl_content, secondFragment)
.addToBackStack(null).commit();
currentPage = 2;
break;
case 2:
thirdFragment = new BindPhoneThirdFragment();
if (bean != null) {
Bundle bundle = new Bundle();
bundle.putString("phone", bean.getData().getUsername());
thirdFragment.setArguments(bundle);
}
getSupportFragmentManager().beginTransaction().replace(R.id.fl_content, thirdFragment)
.addToBackStack(null).commit();
currentPage = 3;
break;
}
}
@Override
public void changeSuccess(String phone) {
isChanged = true;
bean.getData().setUsername(phone);
RvCache.getInstance().save(bean, CacheEnum.USER);
Bundle bundle = new Bundle();
bundle.putString("phone", bean.getData().getUsername());
firstFragment.setArguments(bundle);
getSupportFragmentManager().beginTransaction().replace(R.id.fl_content, firstFragment)
.addToBackStack(null).commit();
currentPage = 1;
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public void finish() {
if (currentPage > 1) {
getSupportFragmentManager().popBackStack();
currentPage -= 1;
} else {
if (isChanged) {
Intent intent = new Intent();
intent.putExtra("phone", bean.getData().getUsername());
setResult(RESULT_OK,intent);
}
super.finish();
}
}
}
...@@ -76,10 +76,10 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme ...@@ -76,10 +76,10 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
if (TextUtils.isEmpty(OkGoUtil.getToken())) { if (TextUtils.isEmpty(OkGoUtil.getToken())) {
tvOutSign.setText("立即登录"); tvOutSign.setText("立即登录");
tvOutSign.setBackgroundResource(R.drawable.shape_rv_bg_shallow_dark_yellow_circle); // tvOutSign.setBackgroundResource(R.drawable.shape_rv_bg_shallow_dark_yellow_circle);
} else { } else {
tvOutSign.setText("退出登录"); tvOutSign.setText("退出登录");
tvOutSign.setBackgroundResource(R.drawable.shape_rv_button_light_gray); // tvOutSign.setBackgroundResource(R.drawable.shape_rv_button_light_gray);
} }
DownListenerManager.getInstance().addDownListener(this); DownListenerManager.getInstance().addDownListener(this);
...@@ -99,7 +99,7 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme ...@@ -99,7 +99,7 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
@Override @Override
public void onNext(LoginSuccessfulEvent event) { public void onNext(LoginSuccessfulEvent event) {
tvOutSign.setText("退出登录"); tvOutSign.setText("退出登录");
tvOutSign.setBackgroundResource(R.drawable.shape_rv_button_light_gray); // tvOutSign.setBackgroundResource(R.drawable.shape_rv_button_light_gray);
} }
}); });
} }
...@@ -142,18 +142,20 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme ...@@ -142,18 +142,20 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
DownListenerManager.getInstance().removeDownListener(this); DownListenerManager.getInstance().removeDownListener(this);
} }
@OnClick({R2.id.rl_item_change_password, R2.id.ll_item_app_push, R2.id.rl_item_clear_cache, R2.id.rl_item_check_for_updates, R2.id.rl_item_about_us, R2.id.tv_out_sign}) @OnClick({R2.id.rl_item_account_safe, R2.id.ll_item_app_push, R2.id.rl_item_clear_cache, R2.id.rl_item_check_for_updates, R2.id.rl_item_about_us, R2.id.tv_out_sign})
public void onViewClicked(View view) { public void onViewClicked(View view) {
int id = view.getId(); int id = view.getId();
if (id == R.id.rl_item_change_password) { if (id == R.id.rl_item_account_safe) {
//修改密码 //修改密码
if (TextUtils.isEmpty(OkGoUtil.getToken())) { if (TextUtils.isEmpty(OkGoUtil.getToken())) {
startActivity(LoginRvActivity.getIntent(mActivity, 0)); startActivity(LoginRvActivity.getIntent(mActivity, 0));
return; return;
} }
startActivity(RegisteredActivity.getIntent(mActivity, 1, 0)); startActivity(new Intent(mActivity, AccountSafeActivity.class));
// startActivity(RegisteredActivity.getIntent(mActivity, 1, 0));
} else if (id == R.id.ll_item_app_push) { } else if (id == R.id.ll_item_app_push) {
//App推送消息 //App推送消息
...@@ -164,6 +166,7 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme ...@@ -164,6 +166,7 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> impleme
deleteDir(Environment.getExternalStorageDirectory() + "/photo/crop"); deleteDir(Environment.getExternalStorageDirectory() + "/photo/crop");
showToast("清理成功!"); showToast("清理成功!");
} else if (id == R.id.rl_item_check_for_updates) { } else if (id == R.id.rl_item_check_for_updates) {
if (!DownListenerManager.getInstance().isDown()) if (!DownListenerManager.getInstance().isDown())
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff" />
<stroke android:width="1dp" android:color="#ffcccccc" />
<corners android:topLeftRadius="80dp" android:topRightRadius="80dp" android:bottomLeftRadius="80dp" android:bottomRightRadius="80dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_10" />
<solid android:color="#f2f2f2" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_40" />
<solid android:color="#F3EADC" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/size_30" />
<solid android:color="#fbf9e8" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/size_100" />
<solid android:color="#fdc349" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/size_100" />
<solid android:color="#fde6b5" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorLine"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:orientation="vertical"
android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15">
<RelativeLayout
android:id="@+id/rl_item_phone"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="手机号"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
<TextView
android:id="@+id/tv_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:contentDescription="手机号"
android:textColor="@color/colorMain"
android:drawablePadding="3dp"
android:drawableRight="@drawable/common_icon_rig_black_gray"
android:textSize="@dimen/sp_16" />
</RelativeLayout>
<include layout="@layout/common_line" />
<RelativeLayout
android:id="@+id/rl_update_pwd"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="登录密码"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
<ImageView
android:id="@+id/tv_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/common_icon_rig_black_gray" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_15"
android:background="@color/colorWrite"
android:orientation="vertical"
android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15">
<RelativeLayout
android:id="@+id/rl_qq"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="QQ"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
<TextView
android:id="@+id/tv_qq"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3"
android:text="去授权绑定QQ"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_16" />
</RelativeLayout>
<include layout="@layout/common_line" />
<RelativeLayout
android:id="@+id/rl_wx"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="微信"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
<TextView
android:id="@+id/tv_wx"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3"
android:text="去授权绑定微信"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_16" />
</RelativeLayout>
<include layout="@layout/common_line" />
<RelativeLayout
android:id="@+id/rl_zfb"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="支付宝"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
<TextView
android:id="@+id/tv_zfb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3"
android:text="去授权绑定支付宝"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_16" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:background="#F5F5F5"
tools:context=".traveler.AlterNickNameActivity">
<EditText
android:id="@+id/et_nickname"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="@dimen/dp_10"
android:background="@color/colorWrite"
android:ellipsize="end"
android:hint="请输入昵称"
android:maxLength="32"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:singleLine="true"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/sp_14" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context=".traveler.BindPhoneActivity">
<FrameLayout
android:id="@+id/fl_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
\ No newline at end of file
...@@ -129,24 +129,50 @@ ...@@ -129,24 +129,50 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="@dimen/size_15" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/text_10" android:layout_marginTop="@dimen/text_10"
android:orientation="horizontal" android:orientation="horizontal"
android:gravity="center_vertical"
android:visibility="gone"> android:visibility="gone">
<ImageView <LinearLayout
android:id="@+id/iv_member" android:paddingLeft="5dp"
android:layout_width="@dimen/size_15" android:paddingRight="5dp"
android:layout_height="@dimen/size_15" /> android:paddingTop="2dp"
android:paddingBottom="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_rv_bg_fbf9e8"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_member"
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15" />
<TextView
android:id="@+id/tv_member"
android:layout_width="wrap_content"
android:layout_height="@dimen/size_15"
android:layout_marginLeft="@dimen/size_2"
android:gravity="center"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_10" />
</LinearLayout>
<TextView <TextView
android:id="@+id/tv_member" android:id="@+id/tv_capacity"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="@dimen/size_15" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_2" android:layout_marginLeft="5dp"
android:gravity="center" android:background="@drawable/shape_rv_bg_f3eadc"
android:textColor="@color/colorMain" android:paddingLeft="5dp"
android:paddingTop="1dp"
android:paddingRight="5dp"
android:paddingBottom="1dp"
android:textColor="#ffd6b263"
android:textSize="@dimen/text_10" /> android:textSize="@dimen/text_10" />
</LinearLayout> </LinearLayout>
<TextView <TextView
......
...@@ -50,20 +50,21 @@ ...@@ -50,20 +50,21 @@
android:textColor="@color/text_Main" android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<EditText <TextView
android:id="@+id/et_nickname" android:id="@+id/tv_nickname"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:drawableRight="@drawable/common_icon_rig_black"
android:drawablePadding="3dp"
android:ellipsize="end"
android:gravity="right|center_vertical" android:gravity="right|center_vertical"
android:hint="请输入昵称"
android:maxLength="32" android:maxLength="32"
android:singleLine="true" android:singleLine="true"
android:ellipsize="end" android:text="请输入昵称"
android:textColor="@color/colorMain" android:textColor="@color/colorGray"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -80,19 +81,18 @@ ...@@ -80,19 +81,18 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:gravity="center_vertical" android:gravity="center_vertical">
android:visibility="gone">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="姓名" android:text="手机号"
android:textColor="@color/text_Main" android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<EditText <EditText
android:id="@+id/et_name" android:id="@+id/et_phone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="@dimen/size_15"
...@@ -100,11 +100,14 @@ ...@@ -100,11 +100,14 @@
android:background="@null" android:background="@null"
android:enabled="false" android:enabled="false"
android:gravity="right|center_vertical" android:gravity="right|center_vertical"
android:hint="请输入姓名" android:hint="请输入手机号"
android:maxLength="10" android:inputType="phone|number"
android:maxLength="11"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray" android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
</LinearLayout> </LinearLayout>
<include layout="@layout/common_line" /> <include layout="@layout/common_line" />
...@@ -179,149 +182,5 @@ ...@@ -179,149 +182,5 @@
android:src="@drawable/common_icon_rig_black" /> android:src="@drawable/common_icon_rig_black" />
</LinearLayout> </LinearLayout>
<include layout="@layout/common_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="手机号"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText
android:id="@+id/et_phone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:background="@null"
android:enabled="false"
android:gravity="right|center_vertical"
android:hint="请输入手机号"
android:inputType="phone|number"
android:maxLength="11"
android:maxLines="1"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
</LinearLayout>
<include layout="@layout/common_line" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:gravity="center_vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="身份证号"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<EditText
android:id="@+id/et_id_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:background="@null"
android:enabled="false"
android:gravity="right|center_vertical"
android:hint="请输入身份证号"
android:maxLength="18"
android:maxLines="1"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_15"
android:background="@color/colorWrite"
android:orientation="vertical"
android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15">
<LinearLayout
android:id="@+id/ll_item_binding_qq"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="QQ"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<TextView
android:id="@+id/tv_binding_qq"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:hint="去授权绑定QQ"
android:text=""
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_8"
android:src="@drawable/common_icon_rig_black" />
</LinearLayout>
<include layout="@layout/common_line" />
<LinearLayout
android:id="@+id/ll_item_binding_wechat"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="微信"
android:textColor="@color/text_Main"
android:textSize="@dimen/text_16" />
<TextView
android:id="@+id/tv_binding_wx"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:hint="去授权绑定微信"
android:text=""
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_8"
android:src="@drawable/common_icon_rig_black" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
android:paddingRight="@dimen/size_15"> android:paddingRight="@dimen/size_15">
<RelativeLayout <RelativeLayout
android:id="@+id/rl_item_change_password" android:id="@+id/rl_item_account_safe"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50"> android:layout_height="@dimen/size_50">
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="修改密码" android:text="账号与安全"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/common_icon_rig_black" /> android:src="@drawable/common_icon_rig_black_gray" />
</RelativeLayout> </RelativeLayout>
<include layout="@layout/common_line" /> <include layout="@layout/common_line" />
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
android:paddingRight="@dimen/size_15"> android:paddingRight="@dimen/size_15">
<RelativeLayout <RelativeLayout
android:id="@+id/rl_item_clear_cache" android:id="@+id/rl_item_check_for_updates"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50"> android:layout_height="@dimen/size_50">
...@@ -86,22 +86,26 @@ ...@@ -86,22 +86,26 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="清除缓存" android:text="检查更新"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<ImageView <TextView
android:id="@+id/tv_version"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/common_icon_rig_black" /> android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3"
android:textColor="#171413"
android:textSize="@dimen/sp_12" />
</RelativeLayout> </RelativeLayout>
<include layout="@layout/common_line" /> <include layout="@layout/common_line" />
<RelativeLayout <RelativeLayout
android:id="@+id/rl_item_check_for_updates" android:id="@+id/rl_item_clear_cache"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50"> android:layout_height="@dimen/size_50">
...@@ -109,19 +113,16 @@ ...@@ -109,19 +113,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="检查更新" android:text="清除缓存"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" /> android:textSize="@dimen/text_16" />
<TextView <ImageView
android:id="@+id/tv_version"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:drawablePadding="@dimen/size_3" android:src="@drawable/common_icon_rig_black_gray" />
android:textColor="#999999"
android:textSize="@dimen/sp_12" />
</RelativeLayout> </RelativeLayout>
<include layout="@layout/common_line" /> <include layout="@layout/common_line" />
...@@ -144,7 +145,7 @@ ...@@ -144,7 +145,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/common_icon_rig_black" /> android:src="@drawable/common_icon_rig_black_gray" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
...@@ -153,13 +154,12 @@ ...@@ -153,13 +154,12 @@
android:id="@+id/tv_out_sign" android:id="@+id/tv_out_sign"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/size_50" android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_20" android:layout_marginTop="@dimen/size_15"
android:layout_marginTop="@dimen/size_70" android:background="@color/colorWrite"
android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_button_light_gray"
android:gravity="center" android:gravity="center"
android:text="退出登录" android:text="退出登录"
android:textColor="@color/colorWrite" /> android:textColor="@color/colorMain"
android:textSize="@dimen/sp_16" />
</LinearLayout> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/size_100"
android:layout_height="@dimen/size_100"
android:layout_marginTop="@dimen/size_50"
android:src="@drawable/icon_bind_phone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="17dp"
android:text="绑定的手机号码"
android:textColor="#666666"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tv_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:textColor="@color/colorMain"
android:textSize="@dimen/sp_16" />
<Button
android:id="@+id/btn_update_phone"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginLeft="27dp"
android:layout_marginTop="52dp"
android:layout_marginRight="27dp"
android:background="@drawable/shape_rv_bg_bind_phone_button"
android:gravity="center"
android:text="更换手机号"
android:textColor="@color/colorMain"
android:textSize="@dimen/sp_16" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/size_20"
android:paddingRight="@dimen/size_20">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_20"
android:text="更换手机号前,需先验证当前绑定手机号"
android:textColor="@color/text_Gray"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tv_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13dp"
android:textColor="@color/colorMain"
android:textSize="@dimen/sp_14" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="26sp"
android:background="@drawable/shape_rv_bg_f2f2f2"
android:orientation="horizontal">
<EditText
android:layout_marginLeft="@dimen/dp_10"
android:id="@+id/et_phone_code"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/colorGrayBg"
android:gravity="center_vertical|left"
android:hint="请输入验证码"
android:inputType="number"
android:maxLength="6"
android:paddingLeft="3dp"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/sp_14" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/size_12"
android:layout_marginBottom="@dimen/text_12"
android:background="@color/text_Gray" />
<TextView
android:id="@+id/tv_get_code"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:gravity="center"
android:text="获取验证码"
android:textColor="@color/colorMain"
android:textSize="14sp" />
</LinearLayout>
<Button
android:id="@+id/btn_next"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="31dp"
android:background="@drawable/shape_rv_bg_fde6b5"
android:gravity="center"
android:text="下一步"
android:textColor="@color/colorWrite"
android:textSize="@dimen/sp_16" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/size_20"
android:paddingRight="@dimen/size_20">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="@dimen/size_30"
android:background="@drawable/shape_rv_bg_f2f2f2"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="13dp"
android:gravity="center"
android:text="+86"
android:textColor="#3A3938"
android:textSize="@dimen/sp_14" />
<EditText
android:id="@+id/et_phone"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10"
android:layout_weight="1"
android:background="@color/colorGrayBg"
android:gravity="center_vertical|left"
android:hint="请输入新绑定的手机号"
android:inputType="phone"
android:maxLength="11"
android:paddingLeft="13dp"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/sp_14" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="26sp"
android:background="@drawable/shape_rv_bg_f2f2f2"
android:orientation="horizontal">
<EditText
android:maxLength="8"
android:id="@+id/et_phone_code"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_10"
android:layout_weight="1"
android:background="@color/colorGrayBg"
android:gravity="center_vertical|left"
android:hint="请输入验证码"
android:inputType="number"
android:paddingLeft="3dp"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/sp_14" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/size_12"
android:layout_marginBottom="@dimen/text_12"
android:background="@color/text_Gray" />
<TextView
android:id="@+id/tv_get_code"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:gravity="center"
android:text="获取验证码"
android:textColor="@color/colorMain"
android:textSize="14sp" />
</LinearLayout>
<Button
android:id="@+id/btn_next"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="@dimen/dp_40"
android:background="@drawable/shape_rv_bg_fde6b5"
android:gravity="center"
android:text="完成"
android:textColor="@color/colorWrite"
android:textSize="@dimen/sp_16" />
</LinearLayout>
...@@ -4,49 +4,75 @@ ...@@ -4,49 +4,75 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_40" android:layout_marginLeft="@dimen/size_40"
android:layout_marginRight="@dimen/size_40" android:layout_marginRight="@dimen/size_40"
android:background="@color/colorWrite" android:background="@drawable/shape_rv_bg_write"
android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <TextView
android:layout_width="match_parent"
android:layout_height="@dimen/size_130"
android:gravity="center" android:gravity="center"
android:orientation="horizontal"> android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/text_12"
android:layout_marginBottom="@dimen/size_15"
android:text="性别"
android:textColor="@color/colorMain"
android:textSize="@dimen/size_20" />
<include layout="@layout/common_line" />
<RelativeLayout
android:id="@+id/rl_man"
android:layout_width="match_parent"
android:layout_height="48dp">
<TextView
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_20"
android:text="男"
android:textColor="@color/colorMain"
android:textSize="18sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<CheckBox <CheckBox
android:layout_marginRight="@dimen/size_15"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:id="@+id/cb_man" android:id="@+id/cb_man"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:button="@drawable/selector_rv_check"
android:enabled="true" android:enabled="true"
android:text="男" android:paddingLeft="@dimen/size_5"
android:textSize="@dimen/text_16" android:textSize="@dimen/text_16" />
android:paddingLeft="@dimen/size_5" </RelativeLayout>
android:button="@drawable/selector_rv_check" />
<include layout="@layout/common_line" />
<RelativeLayout
android:id="@+id/rl_woman"
android:layout_width="match_parent"
android:layout_height="48dp">
<TextView
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_20"
android:text="女"
android:textColor="@color/colorMain"
android:textSize="18sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<CheckBox <CheckBox
android:layout_marginRight="@dimen/size_15"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:id="@+id/cb_girl" android:id="@+id/cb_girl"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_100" android:button="@drawable/selector_rv_check"
android:enabled="true" android:enabled="true"
android:text="女"
android:paddingLeft="@dimen/size_5" android:paddingLeft="@dimen/size_5"
android:textSize="@dimen/text_16" android:textSize="@dimen/text_16" />
android:button="@drawable/selector_rv_check" /> </RelativeLayout>
</LinearLayout>
<include layout="@layout/common_line" />
<TextView
android:id="@+id/tv_ok"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:background="@color/gray_FFB74B"
android:gravity="center"
android:text="确认" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -31,4 +31,13 @@ public class WalletApi { ...@@ -31,4 +31,13 @@ public class WalletApi {
//提现详情 //提现详情
public static String HTTP_URL_WALLET_WITHDRAWDETAIL = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/withdrawDetail.html"; public static String HTTP_URL_WALLET_WITHDRAWDETAIL = RvFrameConfig.HOST_H5_DETAIL + "/h5/appHtml/view/withdrawDetail.html";
//获取支付宝授权信息authInfo
public static String HTTP_URL_WALLET_UNAUTH_GETPARAM = RvFrameConfig.HOST + "/api/universal/info/app/unauth/getParam";
//提交支付宝code
public static String HTTP_URL_WALLET_ALIPAY_GETUSERINFO = RvFrameConfig.HOST + "/api/admin/alipay/getUserInfo";
//获取帐号信息
public static String HTTP_URL_WALLET_ACCOUNT_NUMBER = RvFrameConfig.HOST + "/api/admin/alipay/get";
} }
package com.xxrv.wallet.bean;
import com.ruiwenliu.wrapper.base.BaseBean;
import java.io.Serializable;
import java.util.List;
/**
* 获取支付账号列表
*/
public class AccountNumberListBean extends BaseBean {
private List<DataBean> data;
private boolean rel;
public List<DataBean> getData() {
return data;
}
public void setData(List<DataBean> data) {
this.data = data;
}
public boolean isRel() {
return rel;
}
public void setRel(boolean rel) {
this.rel = rel;
}
public static class DataBean implements Serializable {
private String id;// ":6,
private int userId;//":75,
private String txAlipay;//":"2088212169302286",
private int isDefault;//":0,
private long crtTime;//":1571125067723,
private int isDel;//":0,
private String nickname;//":"PeakLin",
private int type;//":1
private boolean check;
public boolean getCheck() {
return check;
}
public void setCheck(boolean check) {
this.check = check;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getTxAlipay() {
return txAlipay;
}
public void setTxAlipay(String txAlipay) {
this.txAlipay = txAlipay;
}
public int getIsDefault() {
return isDefault;
}
public void setIsDefault(int isDefault) {
this.isDefault = isDefault;
}
public long getCrtTime() {
return crtTime;
}
public void setCrtTime(long crtTime) {
this.crtTime = crtTime;
}
public int getIsDel() {
return isDel;
}
public void setIsDel(int isDel) {
this.isDel = isDel;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
}
}
package com.xxrv.wallet.bean; import android.text.TextUtils; import java.util.Map; public class AuthResult { private String resultStatus; private String result; private String memo; private String resultCode; private String authCode; private String alipayOpenId; public AuthResult(Map<String, String> rawResult, boolean removeBrackets) { if (rawResult == null) { return; } for (String key : rawResult.keySet()) { if (TextUtils.equals(key, "resultStatus")) { resultStatus = rawResult.get(key); } else if (TextUtils.equals(key, "result")) { result = rawResult.get(key); } else if (TextUtils.equals(key, "memo")) { memo = rawResult.get(key); } } String[] resultValue = result.split("&"); for (String value : resultValue) { if (value.startsWith("alipay_open_id")) { alipayOpenId = removeBrackets(getValue("alipay_open_id=", value), removeBrackets); continue; } if (value.startsWith("auth_code")) { authCode = removeBrackets(getValue("auth_code=", value), removeBrackets); continue; } if (value.startsWith("result_code")) { resultCode = removeBrackets(getValue("result_code=", value), removeBrackets); continue; } } } private String removeBrackets(String str, boolean remove) { if (remove) { if (!TextUtils.isEmpty(str)) { if (str.startsWith("\"")) { str = str.replaceFirst("\"", ""); } if (str.endsWith("\"")) { str = str.substring(0, str.length() - 1); } } } return str; } @Override public String toString() { return "authCode={" + authCode + "}; resultStatus={" + resultStatus + "}; memo={" + memo + "}; result={" + result + "}"; } private String getValue(String header, String data) { return data.substring(header.length(), data.length()); } public String getResultStatus() { return resultStatus; } public String getMemo() { return memo; } public String getResult() { return result; } public String getResultCode() { return resultCode; } public String getAuthCode() { return authCode; } public String getAlipayOpenId() { return alipayOpenId; }}
\ No newline at end of file
package com.xxrv.wallet.bean;
import com.ruiwenliu.wrapper.base.BaseBean;
public class WalletAuthInfoBean extends BaseBean {
private String data;
private boolean rel;
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public boolean isRel() {
return rel;
}
public void setRel(boolean rel) {
this.rel = rel;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment