真人认证
This commit is contained in:
parent
9e68f35627
commit
bcfd1c22e6
@ -178,6 +178,16 @@
|
||||
android:label="编辑签名"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.user.AuthActivity"
|
||||
android:label="实名认证"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
<activity
|
||||
android:name=".activity.user.AuthBloggerActivity"
|
||||
android:label="达人认证"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="com.shayu.onetoone.fileprovider"
|
||||
|
@ -2,6 +2,7 @@ package com.shayu.onetoone.activity.login;
|
||||
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
@ -31,6 +32,7 @@ import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -66,6 +68,7 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
int day;
|
||||
|
||||
private String avatarUrl;
|
||||
Dialog dialog;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@ -81,6 +84,7 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
|
||||
initView();
|
||||
initCamera();
|
||||
dialog = DialogUitl.loadingDialog(mContext, "上传中");
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
@ -96,17 +100,20 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
L.e("cameraUtil.setImageResultCallback:");
|
||||
if (file != null) {
|
||||
mAvatarFile = file;
|
||||
dialog.show();
|
||||
OTONetManager.getInstance(CompleteActivity.this).updateFile(mAvatarFile, new HttpCallback<AvatarBean>() {
|
||||
@Override
|
||||
public void onSuccess(AvatarBean data) {
|
||||
ImgLoader.display(mContext, file, userAvatar);
|
||||
//txtChoose.setVisibility(View.GONE);
|
||||
avatarUrl = data.getAvatar();
|
||||
dialog.hide();
|
||||
ToastUtil.show("上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
dialog.hide();
|
||||
ToastUtil.show("上传失败");
|
||||
}
|
||||
});
|
||||
@ -115,7 +122,7 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
|
||||
dialog.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import android.os.Handler;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.login.EntryActivity;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
@ -51,12 +52,12 @@ public class SettingActivity extends AbsActivity {
|
||||
}
|
||||
});
|
||||
|
||||
//黑名单
|
||||
//修改密码
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.change_the_password), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
// 达人认证
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.toBlogger), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//forwardModifyPwd();
|
||||
RouteManager.forwardAuthBloggerActivity();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.logout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
|
@ -0,0 +1,264 @@
|
||||
package com.shayu.onetoone.activity.user;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.AuthBean;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.view.UserAuthPopup;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* 我的 编辑资料
|
||||
*/
|
||||
@Route(path = RouteManager.ACTIVITY_AUTH)
|
||||
public class AuthActivity extends AbsActivity {
|
||||
|
||||
private ImageView image1;
|
||||
private ImageView image2;
|
||||
|
||||
private ImageView image11;
|
||||
private ImageView image22;
|
||||
|
||||
private TextView submit;
|
||||
private ProcessImageUtil cameraUtil;
|
||||
|
||||
private File file1;
|
||||
private File file2;
|
||||
|
||||
private String imgUrl1;
|
||||
private String imgUrl2;
|
||||
|
||||
Dialog dialog;
|
||||
AuthBean authBean;
|
||||
|
||||
private TextView remake;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_auth;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
setTitle(mContext.getString(R.string.edit_profile));
|
||||
image1 = findViewById(R.id.image1);
|
||||
image11 = findViewById(R.id.image11);
|
||||
image2 = findViewById(R.id.image2);
|
||||
image22 = findViewById(R.id.image22);
|
||||
submit = findViewById(R.id.submit);
|
||||
remake = findViewById(R.id.remake);
|
||||
|
||||
image1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
isFront = true;
|
||||
setImage();
|
||||
}
|
||||
});
|
||||
image11.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
isFront = true;
|
||||
setImage();
|
||||
}
|
||||
});
|
||||
image2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
isFront = false;
|
||||
setImage();
|
||||
}
|
||||
});
|
||||
image22.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
isFront = false;
|
||||
setImage();
|
||||
}
|
||||
});
|
||||
submit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
submit();
|
||||
}
|
||||
});
|
||||
initCamera();
|
||||
dialog = DialogUitl.loadingDialog(mContext, "上传中");
|
||||
getAuthInfo();
|
||||
}
|
||||
|
||||
private void getAuthInfo() {
|
||||
OTONetManager.getInstance(AuthActivity.this).getAuthInfo(new HttpCallback<AuthBean>() {
|
||||
@Override
|
||||
public void onSuccess(AuthBean data) {
|
||||
authBean = data;
|
||||
if (data.getName_auth() == 2) {//已通过
|
||||
ImgLoader.display(mContext, data.getAuth_front(), image1);
|
||||
ImgLoader.display(mContext, data.getAuth_back(), image2);
|
||||
image11.setVisibility(View.GONE);
|
||||
image22.setVisibility(View.GONE);
|
||||
submit.setEnabled(false);
|
||||
} else if (data.getName_auth() == 3) {//已提交
|
||||
ImgLoader.display(mContext, data.getAuth_front(), image1);
|
||||
ImgLoader.display(mContext, data.getAuth_back(), image2);
|
||||
image11.setVisibility(View.GONE);
|
||||
image22.setVisibility(View.GONE);
|
||||
submit.setText("審核中,請耐心等待");
|
||||
submit.setEnabled(false);
|
||||
} else {
|
||||
ImgLoader.display(mContext, data.getAuth_front(), image1);
|
||||
ImgLoader.display(mContext, data.getAuth_back(), image2);
|
||||
submit.setText("重新提交");
|
||||
remake.setText(data.getAuth_remark());
|
||||
submit.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil = new ProcessImageUtil(this, "com.shayu.onetoone.fileprovider");
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
L.e("cameraUtil.setImageResultCallback:");
|
||||
if (!dialog.isShowing()) {
|
||||
dialog.show();
|
||||
}
|
||||
if (file != null) {
|
||||
OTONetManager.getInstance(mContext).updateFile(file, new HttpCallback<AvatarBean>() {
|
||||
@Override
|
||||
public void onSuccess(AvatarBean data) {
|
||||
if (data != null) {
|
||||
ToastUtil.show("上传成功");
|
||||
if (isFront) {
|
||||
imgUrl1 = data.getAvatar();
|
||||
file1 = file;
|
||||
ImgLoader.display(mContext, file1, image1);
|
||||
image11.setVisibility(View.GONE);
|
||||
} else {
|
||||
imgUrl2 = data.getAvatar();
|
||||
file2 = file;
|
||||
ImgLoader.display(mContext, file2, image2);
|
||||
image22.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
if (file1 != null && file2 != null) {
|
||||
submit.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_2));
|
||||
}
|
||||
dialog.hide();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
dialog.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
boolean isFront = true;
|
||||
|
||||
private void submit() {
|
||||
OTONetManager.getInstance(AuthActivity.this).setAuthInfo(imgUrl1, imgUrl2, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
ToastUtil.show("已發起審核,請耐心等待審核結果");
|
||||
submit.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
|
||||
submit.setText("審核中,請耐心等待");
|
||||
imgUrl1 = null;
|
||||
imgUrl2 = null;
|
||||
} else {
|
||||
ToastUtil.show(data.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setImage() {
|
||||
UserAuthPopup userAuthPopup = new UserAuthPopup(AuthActivity.this, new UserAuthPopup.onIsCameraClickListener() {
|
||||
@Override
|
||||
public void onIsCamera(boolean isCamera) {
|
||||
if (isCamera) {
|
||||
cameraUtil.getImageByCamera();
|
||||
} else {
|
||||
cameraUtil.getImageByAlumb();
|
||||
}
|
||||
}
|
||||
});
|
||||
new XPopup.Builder(mContext).asCustom(userAuthPopup).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
Bus.getOff(this);
|
||||
if (cameraUtil != null) {
|
||||
cameraUtil.release();
|
||||
}
|
||||
//MainHttpUtil.cancel(MainHttpConsts.UPDATE_AVATAR);
|
||||
//MainHttpUtil.cancel(MainHttpConsts.UPDATE_FIELDS);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private UserBean userModel;
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (Constants.isShowPage != -1) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,176 @@
|
||||
package com.shayu.onetoone.activity.user;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.view.UserAuthPopup;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.CompleteInformationPopup;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* 我的 编辑资料
|
||||
*/
|
||||
@Route(path = RouteManager.ACTIVITY_AUTH_BLOGGER)
|
||||
public class AuthBloggerActivity extends AbsActivity {
|
||||
|
||||
private TextView submit;
|
||||
private ProcessImageUtil cameraUtil;
|
||||
|
||||
Dialog dialog;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_auth_blogger;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
setTitle(mContext.getString(R.string.edit_profile));
|
||||
submit = findViewById(R.id.submit);
|
||||
submit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
submit();
|
||||
}
|
||||
});
|
||||
initCamera();
|
||||
dialog = DialogUitl.loadingDialog(mContext, "上传中");
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil = new ProcessImageUtil(this, "com.shayu.onetoone.fileprovider");
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
L.e("cameraUtil.setImageResultCallback:");
|
||||
if (!dialog.isShowing()) {
|
||||
dialog.show();
|
||||
}
|
||||
if (file != null) {
|
||||
OTONetManager.getInstance(mContext).updateFile(file, new HttpCallback<AvatarBean>() {
|
||||
@Override
|
||||
public void onSuccess(AvatarBean data) {
|
||||
dialog.hide();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
dialog.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
boolean isFront = true;
|
||||
|
||||
private void submit() {
|
||||
/*OTONetManager.getInstance(AuthBloggerActivity.this).setAuthInfo(imgUrl1, imgUrl2, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
ToastUtil.show("已發起審核,請耐心等待審核結果");
|
||||
submit.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
|
||||
submit.setText("審核中,請耐心等待");
|
||||
imgUrl1 = null;
|
||||
imgUrl2 = null;
|
||||
} else {
|
||||
ToastUtil.show(data.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
public void setImage() {
|
||||
UserAuthPopup userAuthPopup = new UserAuthPopup(AuthBloggerActivity.this, new UserAuthPopup.onIsCameraClickListener() {
|
||||
@Override
|
||||
public void onIsCamera(boolean isCamera) {
|
||||
if (isCamera) {
|
||||
cameraUtil.getImageByCamera();
|
||||
} else {
|
||||
cameraUtil.getImageByAlumb();
|
||||
}
|
||||
}
|
||||
});
|
||||
new XPopup.Builder(mContext).asCustom(userAuthPopup).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
Bus.getOff(this);
|
||||
if (cameraUtil != null) {
|
||||
cameraUtil.release();
|
||||
}
|
||||
//MainHttpUtil.cancel(MainHttpConsts.UPDATE_AVATAR);
|
||||
//MainHttpUtil.cancel(MainHttpConsts.UPDATE_FIELDS);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
private UserBean userModel;
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (Constants.isShowPage != -1) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (userModel.getUserInfoComplete() == 1) {
|
||||
finish();
|
||||
} else {
|
||||
new XPopup.Builder(mContext).asCustom(new CompleteInformationPopup(mContext, true, new CompleteInformationPopup.CompleteInformationCallBack() {
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSure() {
|
||||
finish();
|
||||
}
|
||||
})).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -6,9 +6,8 @@ import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.utils.MainHttpConsts;
|
||||
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
@ -17,8 +16,8 @@ import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
@ -67,41 +66,43 @@ public class EditNameActivity extends AbsActivity {
|
||||
ToastUtil.show(R.string.edit_profile_name_empty);
|
||||
return;
|
||||
}
|
||||
MainHttpUtil.updateFields("{\"user_nicename\":\"" + content + "\"}", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
if (info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
ToastUtil.show(obj.getString("msg"));
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
u.setUserNiceName(content);
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setNickname(content);
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
}
|
||||
Intent intent = getIntent();
|
||||
intent.putExtra(Constants.NICK_NAME, content);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
OTONetManager.getInstance(EditNameActivity.this).setFiled("user_nicename", content, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
u.setUserNiceName(content);
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setNickname(content);
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (code == 2001) {
|
||||
Intent intent = getIntent();
|
||||
intent.putExtra(Constants.NICK_NAME, content);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
} else if (data.getCode() == 2001) {
|
||||
//余额不足,跳转支付页面
|
||||
RouteUtil.forwardMyCoin(mContext);
|
||||
ToastUtil.show(msg);
|
||||
ToastUtil.show(data.getMsg());
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
ToastUtil.show(data.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,6 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.listener.OnTimeSelectListener;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
@ -20,7 +18,6 @@ import com.sahooz.library.Country;
|
||||
import com.sahooz.library.CountryPicker;
|
||||
import com.sahooz.library.OnPick;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.login.CompleteActivity;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
@ -114,6 +111,12 @@ public class EditProfileActivity extends AbsActivity {
|
||||
showData(u);
|
||||
}
|
||||
});
|
||||
findViewById(R.id.btn_person).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
RouteManager.forwaradAuthActivity();
|
||||
}
|
||||
});
|
||||
/*if (mUserBean != null) {
|
||||
showData(mUserBean);
|
||||
} else {
|
||||
@ -150,21 +153,23 @@ public class EditProfileActivity extends AbsActivity {
|
||||
avatarUrl = data.getAvatar();
|
||||
ToastUtil.show("上传成功");
|
||||
|
||||
OTONetManager.getInstance(mContext).setInfo(avatarUrl, mName.getText().toString(), userSex, mBirthday.getText().toString(), new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
OTONetManager.getInstance(EditProfileActivity.this).setFiled("avatar", avatarUrl, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
Toast.makeText(mContext, data.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setFaceUrl(avatarUrl);
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
if (data.getCode() == 0) {
|
||||
Toast.makeText(mContext, data.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setFaceUrl(avatarUrl);
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -189,7 +194,6 @@ public class EditProfileActivity extends AbsActivity {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (userModel.getUserInfoComplete() == 1) {
|
||||
@ -258,16 +262,22 @@ public class EditProfileActivity extends AbsActivity {
|
||||
@Override
|
||||
public void onSex(int sex) {
|
||||
userSex = sex;
|
||||
MainHttpUtil.updateFields("{\"sex\":\"" + sex + "\"}", new HttpCallback() {
|
||||
|
||||
|
||||
OTONetManager.getInstance(EditProfileActivity.this).setFiled("sex", String.valueOf(sex), new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
ToastUtil.show(obj.getString("msg"));
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
userModel.setSex(sex);
|
||||
showData(userModel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
})).show();
|
||||
@ -276,26 +286,29 @@ public class EditProfileActivity extends AbsActivity {
|
||||
@Override
|
||||
public void onPick(final Country country) {
|
||||
mCity.setText(country.name);
|
||||
MainHttpUtil.updateFields("{\"location\":\"" + country.name + "\"}", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
if (info.length > 0) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
u.setLocation(country.name);
|
||||
}
|
||||
if (userModel != null) {
|
||||
userModel.setLocation(country.name);
|
||||
}
|
||||
|
||||
showData(userModel);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
OTONetManager.getInstance(EditProfileActivity.this).setFiled("location", country.name, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
u.setLocation(country.name);
|
||||
}
|
||||
ToastUtil.show(obj.getString("msg"));
|
||||
if (userModel != null) {
|
||||
userModel.setLocation(country.name);
|
||||
}
|
||||
|
||||
showData(userModel);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}).show(getSupportFragmentManager(), "country");
|
||||
@ -305,6 +318,8 @@ public class EditProfileActivity extends AbsActivity {
|
||||
.putExtra("token", CommonAppConfig.getInstance().getToken())
|
||||
.putExtra("isBind", isBind)
|
||||
.putExtra("mobile", mobile));*/
|
||||
} else if (i == R.id.auth) {
|
||||
RouteManager.forwaradAuthActivity();
|
||||
}
|
||||
}
|
||||
|
||||
@ -352,21 +367,23 @@ public class EditProfileActivity extends AbsActivity {
|
||||
avatarUrl = userAvatar1;
|
||||
ImgLoader.display(EditProfileActivity.this, avatarUrl, mAvatar);
|
||||
|
||||
OTONetManager.getInstance(mContext).setInfo(avatarUrl, mName.getText().toString(), userSex, mBirthday.getText().toString(), new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
OTONetManager.getInstance(EditProfileActivity.this).setFiled("avatar", avatarUrl, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
Toast.makeText(mContext, data.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setFaceUrl(avatarUrl);
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
if (data.getCode() == 0) {
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setFaceUrl(avatarUrl);
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -374,7 +391,6 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//txtChoose.setVisibility(View.GONE);
|
||||
}, isCamera -> {
|
||||
if (isCamera) {
|
||||
@ -436,31 +452,31 @@ public class EditProfileActivity extends AbsActivity {
|
||||
month = calendar.get(Calendar.MONTH);
|
||||
day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
String strbri = year + "-" + (month + 1) + "-" + day;
|
||||
String strbir = year + "-" + (month + 1) + "-" + day;
|
||||
|
||||
mBirthday.setText(strbri);
|
||||
|
||||
MainHttpUtil.updateFields("{\"birthday\":\"" + strbri + "\"}", new HttpCallback() {
|
||||
mBirthday.setText(strbir);
|
||||
OTONetManager.getInstance(EditProfileActivity.this).setFiled("birthday", strbir, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
if (info.length > 0) {
|
||||
ToastUtil.show(JSON.parseObject(info[0]).getString("msg"));
|
||||
mUserBean.setBirthday(strbri);
|
||||
mBirthday.setText(strbri);
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
mUserBean.setBirthday(strbir);
|
||||
mBirthday.setText(strbir);
|
||||
|
||||
if (userModel != null) {
|
||||
userModel.setBirthday(strbri);
|
||||
}
|
||||
|
||||
showData(userModel);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
if (userModel != null) {
|
||||
userModel.setBirthday(strbir);
|
||||
}
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
|
||||
showData(userModel);
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}).setCancelText("生日").setSubmitColor(getResources().getColor(R.color.blue01)).setSubmitText("完成").setContentTextSize(20).setDate(selectedDate).build();
|
||||
pvTime.show();
|
||||
@ -704,21 +720,23 @@ public class EditProfileActivity extends AbsActivity {
|
||||
mCity.setText(location);
|
||||
}
|
||||
|
||||
MainHttpUtil.updateFields("{\"location\":\"" + location + "\"}", new HttpCallback() {
|
||||
OTONetManager.getInstance(EditProfileActivity.this).setFiled("location", location, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
if (info.length > 0) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
u.setLocation(location);
|
||||
}
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
if (data.getCode() == 0) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
u.setLocation(location);
|
||||
}
|
||||
ToastUtil.show(obj.getString("msg"));
|
||||
EventBus.getDefault().post(new UpdateFieldEvent());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -9,11 +9,13 @@ import android.widget.EditText;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.utils.MainHttpConsts;
|
||||
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -63,26 +65,29 @@ public class EditSignActivity extends AbsActivity {
|
||||
ToastUtil.show(R.string.edit_profile_sign_empty);
|
||||
return;
|
||||
}
|
||||
MainHttpUtil.updateFields("{\"signature\":\"" + content + "\"}", new HttpCallback() {
|
||||
|
||||
OTONetManager.getInstance(EditSignActivity.this).setFiled("signature", content, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
if (info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
ToastUtil.show(obj.getString("msg"));
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
// if (u != null) {
|
||||
// u.setUserNiceName(content);
|
||||
// }
|
||||
Intent intent = getIntent();
|
||||
intent.putExtra(Constants.SIGN, content);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
Intent intent = getIntent();
|
||||
intent.putExtra(Constants.SIGN, content);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
ToastUtil.show(data.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
56
OneToOne/src/main/java/com/shayu/onetoone/bean/AuthBean.java
Normal file
56
OneToOne/src/main/java/com/shayu/onetoone/bean/AuthBean.java
Normal file
@ -0,0 +1,56 @@
|
||||
package com.shayu.onetoone.bean;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class AuthBean extends BaseModel {
|
||||
private int name_auth; //审核状态 1未提交 2通过 3已提交 4驳回
|
||||
private String auth_front; //身份证正面
|
||||
private String auth_back; //身份证反面
|
||||
private String auth_remark; //审核备注
|
||||
|
||||
public AuthBean(int name_auth, String auth_front, String auth_back, String auth_remark) {
|
||||
this.name_auth = name_auth;
|
||||
this.auth_front = auth_front;
|
||||
this.auth_back = auth_back;
|
||||
this.auth_remark = auth_remark;
|
||||
}
|
||||
|
||||
public int getName_auth() {
|
||||
return name_auth;
|
||||
}
|
||||
|
||||
public void setName_auth(int name_auth) {
|
||||
this.name_auth = name_auth;
|
||||
}
|
||||
|
||||
public String getAuth_front() {
|
||||
return auth_front;
|
||||
}
|
||||
|
||||
public void setAuth_front(String auth_front) {
|
||||
this.auth_front = auth_front;
|
||||
}
|
||||
|
||||
public String getAuth_back() {
|
||||
return auth_back;
|
||||
}
|
||||
|
||||
public void setAuth_back(String auth_back) {
|
||||
this.auth_back = auth_back;
|
||||
}
|
||||
|
||||
public String getAuth_remark() {
|
||||
return auth_remark;
|
||||
}
|
||||
|
||||
public void setAuth_remark(String auth_remark) {
|
||||
this.auth_remark = auth_remark;
|
||||
}
|
||||
|
||||
public AuthBean() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -5,6 +5,7 @@ import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.bean.AuthBean;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.bean.CustomBean;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
@ -848,5 +849,84 @@ public class OTONetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置
|
||||
*/
|
||||
public void setFiled(
|
||||
String key, String val,
|
||||
HttpCallback<HttpCallbackModel> callback) {
|
||||
|
||||
API.get().otoApi(mContext).setFiled(key, val)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg()));
|
||||
} else {
|
||||
callback.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 實名認證
|
||||
*/
|
||||
public void setAuthInfo(
|
||||
String authFront, String authBack,
|
||||
HttpCallback<HttpCallbackModel> callback) {
|
||||
|
||||
API.get().otoApi(mContext).setAuthInfo(authFront, authBack)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg()));
|
||||
} else {
|
||||
callback.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实名认证
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void getAuthInfo(HttpCallback<AuthBean> callback) {
|
||||
API.get().otoApi(mContext)
|
||||
.getAuthInfo()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(model -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(model.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
Log.e(TAG, "accept: ", throwable);
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -18,13 +18,32 @@ public class RouteManager {
|
||||
public static final String ACTIVITY_HOME_SEARCH = "/activity/HomeSearchActivity";
|
||||
public static final String ACTIVITY_HOME_SCREEN = "/activity/HomeScreenActivity";
|
||||
public static final String ACTIVITY_CALL_VIDEO = "/activity/CallVideoActivity";
|
||||
public static final String PATH_EDITPROFILE = "/main/EditProfileActivity";
|
||||
public static final String PATH_EDITPROFILE = "/activity/EditProfileActivity";
|
||||
|
||||
//设置基本资料
|
||||
public static final String ACTIVITY_COMPLETE = "/activity/CompleteActivity";
|
||||
|
||||
//选择标签
|
||||
public static final String ACTIVITY_CHOOSE_LABEL = "/activity/ChooseLabelActivity";
|
||||
//真人认证
|
||||
public static final String ACTIVITY_AUTH = "/activity/AuthActivity";
|
||||
//达人认证
|
||||
public static final String ACTIVITY_AUTH_BLOGGER = "/activity/AuthBloggerActivity";
|
||||
|
||||
/**
|
||||
* 达人认证
|
||||
*/
|
||||
public static void forwardAuthBloggerActivity() {
|
||||
ARouter.getInstance().build(ACTIVITY_AUTH_BLOGGER).navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 真人认证
|
||||
*/
|
||||
public static void forwaradAuthActivity() {
|
||||
ARouter.getInstance().build(ACTIVITY_AUTH).navigation();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择标签
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.shayu.onetoone.network;
|
||||
|
||||
import com.shayu.onetoone.bean.AuthBean;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.bean.CustomBean;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.GiftBean;
|
||||
import com.shayu.onetoone.bean.GreetBean;
|
||||
@ -16,7 +16,6 @@ import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
import com.shayu.onetoone.bean.TargetUserInfoBean;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.UserAvatarSelectBean;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
@ -212,6 +211,31 @@ public interface OneToOneApi {
|
||||
@Field("labels") String avatar
|
||||
);
|
||||
|
||||
/**
|
||||
* 设置基本信息
|
||||
*/
|
||||
@GET("/api/public/?service=Friendappinfos.setFiled")
|
||||
Observable<ResponseModel<List<BaseModel>>> setFiled(
|
||||
@Query("key") String key,
|
||||
@Query("val") String val
|
||||
);
|
||||
|
||||
/**
|
||||
* 真人认证
|
||||
*/
|
||||
@GET("/api/public/?service=Friendappinfos.setAuth")
|
||||
Observable<ResponseModel<List<BaseModel>>> setAuthInfo(
|
||||
@Query("auth_front") String authFront,
|
||||
@Query("auth_back") String authBack
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取真人认证信息
|
||||
*/
|
||||
@GET("/api/public/?service=Friendappinfos.getAuth")
|
||||
Observable<ResponseModel<AuthBean>> getAuthInfo(
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,65 @@
|
||||
package com.shayu.onetoone.upload;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* 文件上傳
|
||||
*/
|
||||
|
||||
public class UploadBean {
|
||||
private File mOriginFile;//要被上传的源文件
|
||||
private String mRemoteFileName;//上传成功后在云存储上的文件名字
|
||||
private String mRemoteAccessUrl;//上传成功后在云存储上的访问地址
|
||||
private boolean mSuccess;//是否上传成功了
|
||||
|
||||
public UploadBean() {
|
||||
}
|
||||
|
||||
|
||||
public UploadBean(File originFile) {
|
||||
mOriginFile = originFile;
|
||||
}
|
||||
|
||||
public File getOriginFile() {
|
||||
return mOriginFile;
|
||||
}
|
||||
|
||||
public void setOriginFile(File originFile) {
|
||||
mOriginFile = originFile;
|
||||
}
|
||||
|
||||
public String getRemoteFileName() {
|
||||
return mRemoteFileName;
|
||||
}
|
||||
|
||||
public void setRemoteFileName(String remoteFileName) {
|
||||
mRemoteFileName = remoteFileName;
|
||||
}
|
||||
|
||||
public String getRemoteAccessUrl() {
|
||||
return mRemoteAccessUrl;
|
||||
}
|
||||
|
||||
public void setRemoteAccessUrl(String remoteAccessUrl) {
|
||||
mRemoteAccessUrl = remoteAccessUrl;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return mSuccess;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
mSuccess = success;
|
||||
}
|
||||
|
||||
|
||||
public void setEmpty() {
|
||||
mOriginFile = null;
|
||||
mRemoteFileName = null;
|
||||
mRemoteAccessUrl = null;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return mOriginFile == null && mRemoteFileName == null && mRemoteAccessUrl == null;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.shayu.onetoone.upload;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件上传回调
|
||||
*/
|
||||
|
||||
public interface UploadCallback {
|
||||
void onFinish(List<UploadBean> list, boolean success);
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
package com.shayu.onetoone.upload;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
*/
|
||||
|
||||
public class UploadCustomImpl implements UploadStrategy {
|
||||
|
||||
private static final String TAG = "UploadQnImpl";
|
||||
private Context mContext;
|
||||
private List<UploadBean> mList;
|
||||
private int mIndex;
|
||||
private boolean mNeedCompress;
|
||||
private UploadCallback mUploadCallback;
|
||||
|
||||
public UploadCustomImpl(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upload(List<UploadBean> list, boolean needCompress, UploadCallback callback) {
|
||||
if (callback == null) {
|
||||
return;
|
||||
}
|
||||
if (list == null || list.size() == 0) {
|
||||
callback.onFinish(list, false);
|
||||
return;
|
||||
}
|
||||
boolean hasFile = false;
|
||||
for (UploadBean bean : list) {
|
||||
if (bean.getOriginFile() != null) {
|
||||
hasFile = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasFile) {
|
||||
callback.onFinish(list, true);
|
||||
return;
|
||||
}
|
||||
mList = list;
|
||||
mNeedCompress = needCompress;
|
||||
mUploadCallback = callback;
|
||||
mIndex = 0;
|
||||
uploadNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelUpload() {
|
||||
}
|
||||
|
||||
private void uploadNext() {
|
||||
UploadBean bean = null;
|
||||
while (mIndex < mList.size() && (bean = mList.get(mIndex)).getOriginFile() == null) {
|
||||
mIndex++;
|
||||
}
|
||||
if (mIndex >= mList.size() || bean == null) {
|
||||
if (mUploadCallback != null) {
|
||||
mUploadCallback.onFinish(mList, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
upload(bean);
|
||||
}
|
||||
|
||||
private void upload(UploadBean bean) {
|
||||
OTONetManager.getInstance(mContext).updateFile(bean.getOriginFile(), new HttpCallback<AvatarBean>() {
|
||||
@Override
|
||||
public void onSuccess(AvatarBean data) {
|
||||
if (data != null) {
|
||||
bean.setRemoteAccessUrl(data.getAvatar());
|
||||
bean.setSuccess(true);
|
||||
uploadNext();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shayu.onetoone.upload;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
public interface UploadStrategy {
|
||||
|
||||
/**
|
||||
* 执行上传
|
||||
*
|
||||
* @param list 被上传的文件列表
|
||||
* @param needCompress 是否需要压缩
|
||||
* @param callback 上传回调
|
||||
*/
|
||||
void upload(List<UploadBean> list, boolean needCompress, UploadCallback callback);
|
||||
|
||||
/**
|
||||
* 取消上传
|
||||
*/
|
||||
void cancelUpload();
|
||||
}
|
@ -404,8 +404,8 @@ public class MainHttpUtil {
|
||||
* @param fields 用户资料 ,以json形式出现
|
||||
*/
|
||||
public static void updateFields(String fields, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("User.updateFields", MainHttpConsts.UPDATE_FIELDS)
|
||||
.params("fields", fields)
|
||||
HttpClient.getInstance().get("Friendappinfos.setFiled", MainHttpConsts.UPDATE_FIELDS)
|
||||
.params("key", fields)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,71 @@
|
||||
package com.shayu.onetoone.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.shayu.onetoone.R;
|
||||
|
||||
public class UserAuthPopup extends BottomPopupView implements View.OnClickListener {
|
||||
|
||||
private ImageView camera;
|
||||
private ImageView album;
|
||||
private Context mContext;
|
||||
|
||||
public interface OnItemClickListener<T> {
|
||||
void onItemClick(String userAvatar);
|
||||
}
|
||||
|
||||
private onIsCameraClickListener onIsCameraClickListener;
|
||||
|
||||
public interface onIsCameraClickListener {
|
||||
void onIsCamera(boolean isCamera);
|
||||
}
|
||||
|
||||
public UserAuthPopup(@NonNull Context context, onIsCameraClickListener onIsCameraClickListener) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
this.onIsCameraClickListener = onIsCameraClickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.dialog_auth_avatar;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
}
|
||||
|
||||
|
||||
private void initView() {
|
||||
camera = findViewById(R.id.camera);
|
||||
album = findViewById(R.id.album);
|
||||
camera.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onIsCameraClickListener.onIsCamera(true);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
album.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onIsCameraClickListener.onIsCamera(false);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
12
OneToOne/src/main/res/drawable/bg_auth_submit_1.xml
Normal file
12
OneToOne/src/main/res/drawable/bg_auth_submit_1.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="136dp" android:height="54dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#D1D1D1" />
|
||||
<corners android:bottomLeftRadius="20dp"
|
||||
android:bottomRightRadius="20dp"
|
||||
android:topLeftRadius="20dp"
|
||||
android:topRightRadius="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
13
OneToOne/src/main/res/drawable/bg_auth_submit_2.xml
Normal file
13
OneToOne/src/main/res/drawable/bg_auth_submit_2.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="136dp" android:height="54dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#8E7DDF" />
|
||||
<corners
|
||||
android:bottomLeftRadius="20dp"
|
||||
android:bottomRightRadius="20dp"
|
||||
android:topLeftRadius="20dp"
|
||||
android:topRightRadius="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
12
OneToOne/src/main/res/drawable/bg_edit.xml
Normal file
12
OneToOne/src/main/res/drawable/bg_edit.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="136dp" android:height="54dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:bottomLeftRadius="20dp"
|
||||
android:bottomRightRadius="20dp"
|
||||
android:topLeftRadius="20dp"
|
||||
android:topRightRadius="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
131
OneToOne/src/main/res/layout/activity_auth.xml
Normal file
131
OneToOne/src/main/res/layout/activity_auth.xml
Normal file
@ -0,0 +1,131 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F7F8F9"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/view_title_custom" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="真人說明"
|
||||
android:textColor="@color/black2"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="請上傳您的身份證正反面完成真人認證,完成認證可獲得跟多消息推送并提高聊天,收禮的收益比例"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="身份證正面"
|
||||
android:textColor="@color/black2"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="40dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_add_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image11"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_add_img" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="身份證背面"
|
||||
android:textColor="@color/black2"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="40dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_add_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image22"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_add_img" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/remake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="身份證背面"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="70dp"
|
||||
android:background="@drawable/bg_auth_submit_1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="發起審核"
|
||||
android:textColor="@color/black2"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
311
OneToOne/src/main/res/layout/activity_auth_blogger.xml
Normal file
311
OneToOne/src/main/res/layout/activity_auth_blogger.xml
Normal file
@ -0,0 +1,311 @@
|
||||
<?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="#F7F8F9"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/view_title_custom" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="#FEE9EE"
|
||||
android:gravity="center"
|
||||
android:text="带*为必填项,為保障您的利益,請如實填寫"
|
||||
android:textColor="#E26891"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="性别"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/sex_radio_2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="男"
|
||||
android:textColor="@color/black2"
|
||||
android:textSize="16dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="30dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/sex_radio_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="女"
|
||||
android:textColor="@color/black2"
|
||||
android:textSize="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="真实姓名"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_edit"
|
||||
android:hint="請填寫您的真實姓名"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black2"
|
||||
android:textColorHint="#B5B5B5"
|
||||
android:textSize="14dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="手机号码"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="60dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_edit"
|
||||
android:hint="請填寫您的真實姓名"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black2"
|
||||
android:textColorHint="#B5B5B5"
|
||||
android:textSize="14dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="上传手持证件照"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="100dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_add_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image11"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_add_img" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_img" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="請將证件頭像朝向前方"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="參考圖"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="上傳背景圖片"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="3"
|
||||
tools:itemCount="9"
|
||||
tools:listitem="@layout/item_auth_blogger_img" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="70dp"
|
||||
android:background="@drawable/bg_auth_submit_1"
|
||||
android:gravity="center"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="發起審核"
|
||||
android:textColor="@color/black2"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -8,417 +8,400 @@
|
||||
|
||||
<include layout="@layout/view_title_custom" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/setting_item_top"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_avatar"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_avatar"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="頭像"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="頭像"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="25dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="25dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true" />
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_name"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_name"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="暱稱"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="暱稱"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_sign"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_sign"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="簽名"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="簽名"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sign"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/sign"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_birthday"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_birthday"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="生日"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="生日"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/birthday"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/birthday"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_sex"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_sex"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="性別"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="性別"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sex"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="25dp"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/sex"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="25dp"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_city"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="所在地"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/city"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rt_bind_phone"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="綁定手機"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_city"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="58dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="所在地"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bind_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:hint="@string/bind_phone_text"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="44dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/city"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_person"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="真人認證"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="58dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/rt_bind_phone"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="綁定手機"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_like"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="58dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="興趣"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_bind_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:hint="@string/bind_phone_text"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_person"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="真人認證"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="58dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="*"
|
||||
android:textColor="#FF5730"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_like"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="興趣"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textColor="#353535"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
|
@ -182,6 +182,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/toBlogger"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
31
OneToOne/src/main/res/layout/dialog_auth_avatar.xml
Normal file
31
OneToOne/src/main/res/layout/dialog_auth_avatar.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?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="100dp"
|
||||
android:background="@drawable/bg_user_avatar"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/camera"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_camera" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_album" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
24
OneToOne/src/main/res/layout/item_auth_blogger_img.xml
Normal file
24
OneToOne/src/main/res/layout/item_auth_blogger_img.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/auth_add_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image11"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_add" />
|
||||
</RelativeLayout>
|
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_add_bg.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_add_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_add_img.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_add_img.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_img.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_img.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/icon_add.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/icon_add.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/sex_radio_1.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/sex_radio_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/sex_radio_2.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/sex_radio_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -69,7 +69,8 @@ public class DialogUitl {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
public static void showToast(Context context,String content,long delayMillis){
|
||||
|
||||
public static void showToast(Context context, String content, long delayMillis) {
|
||||
Dialog dialog = new Dialog(context, R.style.dialog);
|
||||
dialog.setContentView(R.layout.dialog_toast);
|
||||
dialog.setCancelable(false);
|
||||
@ -82,7 +83,7 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
dialog.show();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss,delayMillis);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(dialog::dismiss, delayMillis);
|
||||
}
|
||||
|
||||
|
||||
@ -90,6 +91,10 @@ public class DialogUitl {
|
||||
return loadingDialog(context, "");
|
||||
}
|
||||
|
||||
public static Dialog loadingDialogContent(Context context, String content) {
|
||||
return loadingDialog(context, content);
|
||||
}
|
||||
|
||||
public static void showSimpleTipDialog(Context context, String content) {
|
||||
showSimpleTipDialog(context, null, content);
|
||||
}
|
||||
@ -483,8 +488,8 @@ public class DialogUitl {
|
||||
mClickCallback3.onConfirmClick(dialog);
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onConfirmClick(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onConfirmClick(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@ -501,8 +506,8 @@ public class DialogUitl {
|
||||
((SimpleCallback2) mClickCallback).onCancelClick();
|
||||
}
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onCancel(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
}else{
|
||||
mSimpleCallbackView.onCancel(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
@ -510,17 +515,17 @@ public class DialogUitl {
|
||||
}
|
||||
}
|
||||
};
|
||||
if(btnConfirm!=null) {
|
||||
if (btnConfirm != null) {
|
||||
btnConfirm.setOnClickListener(listener);
|
||||
}
|
||||
if(btnCancel!=null) {
|
||||
if (btnCancel != null) {
|
||||
btnCancel.setOnClickListener(listener);
|
||||
}
|
||||
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
|
||||
@Override
|
||||
public void onShow(DialogInterface dialogInterface) {
|
||||
if (mSimpleCallbackView != null) {
|
||||
mSimpleCallbackView.onShow(dialog,titleView, content, btnConfirm, btnCancel);
|
||||
mSimpleCallbackView.onShow(dialog, titleView, content, btnConfirm, btnCancel);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -158,7 +158,6 @@ public class ProcessImageUtil extends ProcessResultUtil {
|
||||
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 开启摄像头,执行照相
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user