编辑资料界面修改和接口走通,up认证界面问题已修
This commit is contained in:
@@ -174,6 +174,18 @@
|
||||
<activity
|
||||
android:name=".view.base.BaseActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".view.settings.PersonalJobActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".view.settings.PersonalSchoolActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".view.settings.PhotoListTwoActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".view.register.RegisterActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
@@ -194,6 +194,8 @@ public class RegisterManager {
|
||||
builder.addParam("cityId", (String) map.get("city"));
|
||||
builder.addParam("birthday", (String) map.get("birthday"));
|
||||
builder.addParam("job", (String) map.get("job"));
|
||||
builder.addParam("height", (String) map.get("height"));
|
||||
builder.addParam("school", (String) map.get("school"));
|
||||
builder.addParam("del_video", (String) map.get("del_video"));
|
||||
if (null != map.get("inviteId") && !"".equals(map.get("inviteId"))) {
|
||||
builder.addParam("invite_code", (String) map.get("inviteId"));
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.xuebiping.bolizhuzi.model.settings;
|
||||
|
||||
public class InvitationTotal {
|
||||
private int total_reward;
|
||||
private int total_invite_reward;
|
||||
private int total_commission_coin;
|
||||
private int total_invite;
|
||||
private int total_commission;
|
||||
private int recharge_count;
|
||||
@@ -48,11 +48,11 @@ public class InvitationTotal {
|
||||
this.auth_count = auth_count;
|
||||
}
|
||||
|
||||
public int getTotal_invite_reward() {
|
||||
return total_invite_reward;
|
||||
public int getTotal_commission_coin() {
|
||||
return total_commission_coin;
|
||||
}
|
||||
|
||||
public void setTotal_invite_reward(int total_invite_reward) {
|
||||
this.total_invite_reward = total_invite_reward;
|
||||
public void setTotal_commission_coin(int total_commission_coin) {
|
||||
this.total_commission_coin = total_commission_coin;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,11 +38,29 @@ public class UserInfoBean {
|
||||
private int newer_win_status;//新用户弹窗标识:1=新用户、0=旧用户
|
||||
private String job;
|
||||
private String signature;
|
||||
private String school;
|
||||
private UserFrameBean user_frame;
|
||||
private int height;
|
||||
private int user_type;
|
||||
private int online_status;
|
||||
private int do_not_disturb;
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(int height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public String getSchool() {
|
||||
return school;
|
||||
}
|
||||
|
||||
public void setSchool(String school) {
|
||||
this.school = school;
|
||||
}
|
||||
|
||||
public int getDo_not_disturb() {
|
||||
return do_not_disturb;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.xuebiping.bolizhuzi.view.settings;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -8,6 +9,7 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.media.ThumbnailUtils;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.Html;
|
||||
@@ -19,10 +21,12 @@ import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -89,6 +93,9 @@ import com.fengliyan.uikit.sketch.SketchImageView;
|
||||
import com.fengliyan.uikit.toast.MaleToast;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
@@ -110,6 +117,8 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
private String[] permissions = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
|
||||
public static final int VIDEO_COVER_REQUEST = 501;//封面视频
|
||||
public static final int SIGNATURE_REQUEST = 502;//个性签名
|
||||
public static final int JOB_REQUEST = 503;//职业
|
||||
public static final int SCHOOL_REQUEST = 504;//学校
|
||||
public static final int MULTI_SELECTOR_REQUEST = 200;
|
||||
public static final int PERMISSION_REQUEST_CODE = 101;
|
||||
public static final int REQUEST_EDIT_NICKNAME = 210;
|
||||
@@ -170,6 +179,8 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
private String mOldBirthday = "";
|
||||
private String mOldCity = "";
|
||||
private String mOldJob = "";
|
||||
private String mOldSchool = "";
|
||||
private String mOldHeight = "";
|
||||
private WQTipsDialog mWQTipsDialog;
|
||||
private String mEdit_nickname_tip;
|
||||
private String mNickname_tip;
|
||||
@@ -185,7 +196,21 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
TextView videoStatusLabel;
|
||||
View videoBtn;
|
||||
private String del_video = "0";
|
||||
private String job = "自由职业-自由职业";
|
||||
//private String job = "自由职业-自由职业";
|
||||
private SimpleDraweeView photosImageView;
|
||||
private TextView settings_info_edit_age;
|
||||
private TextView settings_info_edit_xz;
|
||||
private TextView settings_info_edit_gender;
|
||||
private TextView settings_info_edit_school;
|
||||
private TextView settings_info_edit_height;
|
||||
private String height;
|
||||
private RelativeLayout photosBtn;
|
||||
private String album;
|
||||
private String mOldalbum;
|
||||
private RelativeLayout settings_info_edit_height_layout;
|
||||
private RelativeLayout settings_info_edit_xx_layout;
|
||||
private TextView tv_finish_bfb;
|
||||
private ProgressBar progress_bar_bfb;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle onSavedInstance) {
|
||||
@@ -200,6 +225,11 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
tv_finish_bfb = findViewById(R.id.tv_finish_bfb);
|
||||
progress_bar_bfb = findViewById(R.id.progress_bar_bfb);
|
||||
|
||||
progress_bar_bfb.setMax(100);
|
||||
|
||||
videoStatusLabel = findViewById(R.id.videoStatusLabel);
|
||||
avatarImageView = findViewById(R.id.avatarImageView);
|
||||
videoCoverImageView = findViewById(R.id.videoCoverImageView);
|
||||
@@ -221,7 +251,17 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
|
||||
}
|
||||
});
|
||||
photosImageView = findViewById(R.id.photosImageView);
|
||||
photosBtn = findViewById(R.id.photosBtn);
|
||||
settings_info_edit_age = findViewById(R.id.settings_info_edit_age);
|
||||
settings_info_edit_xz = findViewById(R.id.settings_info_edit_xz);
|
||||
settings_info_edit_gender = findViewById(R.id.settings_info_edit_gender);
|
||||
settings_info_edit_school = findViewById(R.id.settings_info_edit_school);
|
||||
settings_info_edit_xx_layout = findViewById(R.id.settings_info_edit_xx_layout);
|
||||
settings_info_edit_height_layout = findViewById(R.id.settings_info_edit_height_layout);
|
||||
settings_info_edit_height = findViewById(R.id.settings_info_edit_height);
|
||||
mPhotoListView = findViewById(R.id.settings_info_edit_photos);
|
||||
mPhotoListView.setVisibility(View.GONE);
|
||||
mNickNameLayout = findViewById(R.id.settings_info_edit_nick_name_layout);
|
||||
mBirthDayLayout = findViewById(R.id.settings_info_edit_birthday_layout);
|
||||
mJobLayout = findViewById(R.id.settings_info_edit_job_layout);
|
||||
@@ -246,9 +286,15 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
mSignLayout.setOnClickListener(this);
|
||||
mConfirmButton.setOnClickListener(this);
|
||||
info_video_delete.setOnClickListener(this);
|
||||
photosBtn.setOnClickListener(this);
|
||||
settings_info_edit_height_layout.setOnClickListener(this);
|
||||
settings_info_edit_xx_layout.setOnClickListener(this);
|
||||
|
||||
initHeightOptionPicker();
|
||||
|
||||
videoBtn = findViewById(R.id.videoBtn);
|
||||
if (UserManager.getUserInfo().isWomen()) {
|
||||
videoBtn.setVisibility(View.VISIBLE);
|
||||
videoBtn.setVisibility(View.GONE);
|
||||
} else {
|
||||
videoBtn.setVisibility(View.GONE);
|
||||
}
|
||||
@@ -314,6 +360,7 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private PermissionDialog permissionDialog;
|
||||
@@ -515,15 +562,10 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
|
||||
// 最后一步之前检测视频和头像是否有变化
|
||||
private void editProfile(String albums) {
|
||||
if (videoFile != null && videoUrl == null && videoCoverUrl == null) {
|
||||
/*if (videoFile != null && videoUrl == null && videoCoverUrl == null) {
|
||||
uploadVideo(albums);
|
||||
return;
|
||||
}
|
||||
if (avatarPath != null && avatarUrl == null) {
|
||||
//uploadAvatar
|
||||
uploadAvatar(albums);
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
if (mUserInfo == null) {
|
||||
return;
|
||||
}
|
||||
@@ -537,7 +579,9 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
map.put("gender", mUserInfo.getGender() + "");
|
||||
map.put("avatar", avatarUrl);
|
||||
map.put("city", mCityId);
|
||||
map.put("job", job);
|
||||
map.put("job", mJob.getText().toString());
|
||||
map.put("height", height);
|
||||
map.put("school", settings_info_edit_school.getText().toString());
|
||||
map.put("birthday", mBirthDay.getText().toString());
|
||||
map.put("del_video", del_video);
|
||||
if (videoUrl != null) {
|
||||
@@ -607,11 +651,26 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
} else if (view == mConfirmButton) {
|
||||
submit();
|
||||
} else if (view == mJobLayout) {
|
||||
pvOptions.show();
|
||||
//pvOptions.show();
|
||||
Intent intent = new Intent(this, PersonalJobActivity.class);
|
||||
intent.putExtra("job", mJob.getText());
|
||||
startActivityForResult(intent, JOB_REQUEST);
|
||||
} else if (view == mSignLayout) {
|
||||
Intent intent = new Intent(this, PersonalSignatureActivity.class);
|
||||
intent.putExtra("signature", mSign.getText());
|
||||
startActivityForResult(intent, SIGNATURE_REQUEST);
|
||||
}else if(view == photosBtn){
|
||||
Intent intent = new Intent(this, PhotoListTwoActivity.class);
|
||||
if(!TextUtils.isEmpty(mOldalbum)){
|
||||
intent.putExtra("album", mOldalbum);
|
||||
}
|
||||
startActivityForResult(intent,206);
|
||||
}else if(view == settings_info_edit_xx_layout){
|
||||
Intent intent = new Intent(this, PersonalSchoolActivity.class);
|
||||
intent.putExtra("school", settings_info_edit_school.getText().toString());
|
||||
startActivityForResult(intent, SCHOOL_REQUEST);
|
||||
}else if(view == settings_info_edit_height_layout){
|
||||
pvHeighttions.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,7 +698,7 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
});
|
||||
}
|
||||
|
||||
void uploadAvatar(String albums) {
|
||||
void uploadAvatar(String avatarPath) {
|
||||
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".jpg", avatarPath);
|
||||
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||
DynamicsManager.uploadImage(this, files, "album",
|
||||
@@ -647,7 +706,7 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||
avatarUrl = result.get(0).getUrl();
|
||||
editProfile(albums);
|
||||
//editProfile(albums);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -728,24 +787,29 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
*/
|
||||
private void updateData() {
|
||||
boolean hasPhoto = false;
|
||||
for (String path : mPhotoDataList) {
|
||||
/*for (String path : mPhotoDataList) {
|
||||
if (path.equals("") || path.equals("selector")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
hasPhoto = true;
|
||||
}*/
|
||||
|
||||
|
||||
if(!TextUtils.isEmpty(album)){
|
||||
hasPhoto = true;
|
||||
}
|
||||
|
||||
if (!hasPhoto) {
|
||||
editProfile(null);
|
||||
} else {
|
||||
new Thread(new Runnable() {
|
||||
/* new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
compressAndUpload();
|
||||
}
|
||||
}).start();
|
||||
|
||||
}).start();*/
|
||||
editProfile(album);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -792,13 +856,35 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
int month = calendar.get(Calendar.MONTH) + 1;
|
||||
int day = calendar.get(Calendar.DATE);
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
mBirthDay.setText(year + "-" + month + "-" + day + " ");
|
||||
|
||||
String mm = "";
|
||||
if(String.valueOf(month).length() == 1) {
|
||||
mm = "0"+month;
|
||||
}else {
|
||||
mm = month+"";
|
||||
}
|
||||
|
||||
String dd = "";
|
||||
if(String.valueOf(day).length() == 1) {
|
||||
dd = "0"+day;
|
||||
}else {
|
||||
dd = day+"";
|
||||
}
|
||||
mBirthDay.setText(year + "-" + mm + "-" + dd);
|
||||
int age = calculateAge(mBirthDay.getText().toString().trim());
|
||||
String zodiac = getZodiac(mBirthDay.getText().toString().trim());
|
||||
|
||||
settings_info_edit_age.setText(age+"");
|
||||
settings_info_edit_xz.setText(zodiac);
|
||||
|
||||
}
|
||||
}).setRangDate(startCalendar, endCalendar).build();
|
||||
|
||||
mAgePicker.setDate(endCalendar);
|
||||
initOptionPicker();
|
||||
//initOptionPicker();
|
||||
}
|
||||
|
||||
int progress = 0;
|
||||
|
||||
public void getUserInfo() {
|
||||
SettingManager.getHomeUser(this, new HttpUiCallBack<UserHomeBean>() {
|
||||
@@ -813,7 +899,7 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
videoCoverImageView.setVisibility(View.VISIBLE);
|
||||
info_video_delete.setVisibility(View.VISIBLE);
|
||||
videoStatusLabel.setVisibility(View.GONE);
|
||||
videoCoverImageView.setImageURI(StrU.getResourcePath(result.getUserinfo().getVideo_cover_url(),activity));
|
||||
videoCoverImageView.setImageURI(StrU.getResourcePath(result.getUserinfo().getVideo_cover_url(), activity));
|
||||
/*RequestOptions requestOptions = new RequestOptions()
|
||||
.centerCrop()
|
||||
.override(100, 100);
|
||||
@@ -830,6 +916,11 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
//旧生日初始化
|
||||
mOldBirthday = result.getUserinfo().getBirthday();
|
||||
mBirthDay.setText(result.getUserinfo().getBirthday());
|
||||
int age = calculateAge(mOldBirthday);
|
||||
settings_info_edit_age.setText(age+"");
|
||||
String zodiac = getZodiac(mOldBirthday);
|
||||
settings_info_edit_xz.setText(zodiac);
|
||||
|
||||
//旧城市初始化
|
||||
mOldCity = result.getUserinfo().getCity();
|
||||
mCity.setText(result.getUserinfo().getCity());
|
||||
@@ -843,15 +934,39 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
mNickname_tip = result.getUserinfo().getNickname_tip();
|
||||
mEdit_nickname_tip = result.getUserinfo().getEdit_nickname_tip();
|
||||
|
||||
if(result.getUserinfo().getGender() == 1) {
|
||||
settings_info_edit_gender.setText("男");
|
||||
}else {
|
||||
settings_info_edit_gender.setText("女");
|
||||
}
|
||||
|
||||
mOldHeight = result.getUserinfo().getHeight()+"";
|
||||
if(result.getUserinfo().getHeight() > 0) {
|
||||
settings_info_edit_height.setText(result.getUserinfo().getHeight() + "CM");
|
||||
}
|
||||
|
||||
mOldSchool = result.getUserinfo().getSchool();
|
||||
settings_info_edit_school.setText(result.getUserinfo().getSchool());
|
||||
|
||||
List<String> album_list = result.getUserinfo().getAlbum_list();
|
||||
mRequestArray.addAll(album_list);
|
||||
int size = album_list.size();
|
||||
if (size > 0) {
|
||||
photosImageView.setImageURI(StrU.getResourcePath(album_list.get(0), activity));
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (int i = 0; i < size; i++) {
|
||||
mPhotoDataList.set(i, album_list.get(i));
|
||||
mOldPhotoDataList.set(i, album_list.get(i));
|
||||
|
||||
String str = album_list.get(i);
|
||||
stringBuilder.append(str);
|
||||
if (i < size - 1) {
|
||||
stringBuilder.append(",");
|
||||
}
|
||||
}
|
||||
|
||||
mOldalbum = stringBuilder.toString();
|
||||
|
||||
if (size < 6) {
|
||||
mPhotoDataList.set(size, "selector");
|
||||
mOldPhotoDataList.set(size, "selector");
|
||||
@@ -861,18 +976,22 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
//职业
|
||||
if (!TextUtils.isEmpty(result.getUserinfo().getJob())) {
|
||||
/*if (!TextUtils.isEmpty(result.getUserinfo().getJob())) {
|
||||
job = result.getUserinfo().getJob();
|
||||
} else {
|
||||
job = "自由职业-自由职业";
|
||||
}
|
||||
List<String> jobList = Arrays.asList(job.split("-"));
|
||||
}*/
|
||||
/* List<String> jobList = Arrays.asList(job.split("-"));
|
||||
if (jobList.size() > 0) {
|
||||
mJob.setText(jobList.get(jobList.size() - 1));
|
||||
}
|
||||
} else {
|
||||
mJob.setText(jobList.get(0));
|
||||
}*/
|
||||
|
||||
mJob.setText(result.getUserinfo().getJob());
|
||||
|
||||
if (result.getIp_info() != null) {
|
||||
settings_info_edit_ip_city_layout.setVisibility(View.VISIBLE);
|
||||
settings_info_edit_ip_city_layout.setVisibility(View.GONE);
|
||||
settings_info_edit_ip_city.setText(!TextUtils.isEmpty(result.getIp_info().getProvince()) ? result.getIp_info().getProvince() : !TextUtils.isEmpty(result.getIp_info().getCity()) ? result.getIp_info().getCity() : "未知");
|
||||
if (mCityId == null) {
|
||||
if (!TextUtils.isEmpty(result.getIp_info().getCity())) {
|
||||
@@ -883,6 +1002,45 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
mCity.setText(!TextUtils.isEmpty(result.getIp_info().getProvince()) ? result.getIp_info().getProvince() : !TextUtils.isEmpty(result.getIp_info().getCity()) ? result.getIp_info().getCity() : "未知");
|
||||
}
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(mUserInfo.getNickname())){
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(mUserInfo.getAvatar())){
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
if(mUserInfo.getAlbum_list() != null && mUserInfo.getAlbum_list().size() > 0){
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
if(mUserInfo.getGender() == 1 || mUserInfo.getGender() == 2) {
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(mUserInfo.getBirthday())){
|
||||
progress = progress + 20;
|
||||
}
|
||||
|
||||
if(mUserInfo.getHeight() != 0){
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(mUserInfo.getJob())){
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(mUserInfo.getSchool())){
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(mUserInfo.getSignature())){
|
||||
progress = progress + 10;
|
||||
}
|
||||
|
||||
tv_finish_bfb.setText(progress+"%");
|
||||
progress_bar_bfb.setProgress(progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -965,7 +1123,8 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
} else if (requestCode == VIDEO_COVER_REQUEST) {//封面视频
|
||||
if (data != null) {
|
||||
String videoPath = data.getStringExtra("VideoPath");
|
||||
if (ConstUrl.LOGDEBUG) Log.i(TAG, "onActivityResult: videoPath----------->" + videoPath);
|
||||
if (ConstUrl.LOGDEBUG)
|
||||
Log.i(TAG, "onActivityResult: videoPath----------->" + videoPath);
|
||||
|
||||
String md5 = MD5.getStreamMD5(videoPath);
|
||||
String filename = md5 + "." + FileUtil.getExtensionName(videoPath);
|
||||
@@ -1018,6 +1177,29 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
isSignature = true;
|
||||
mSign.setText(city);
|
||||
}
|
||||
}else if (requestCode == JOB_REQUEST && resultCode == RESULT_OK) {
|
||||
if (null != data) {
|
||||
String job = data.getStringExtra("job");
|
||||
isJob = true;
|
||||
mJob.setText(job);
|
||||
}
|
||||
}else if (requestCode == SCHOOL_REQUEST && resultCode == RESULT_OK) {
|
||||
if (null != data) {
|
||||
String school = data.getStringExtra("school");
|
||||
isSchool = true;
|
||||
settings_info_edit_school.setText(school);
|
||||
}
|
||||
}else if(requestCode == 206){
|
||||
if(data != null) {
|
||||
album = data.getStringExtra("album");
|
||||
mOldalbum = album;
|
||||
if(!TextUtils.isEmpty(album) && album.contains(",")) {
|
||||
String[] split = album.split(",");
|
||||
if (split.length > 0) {
|
||||
photosImageView.setImageURI(ConstUrl.IMAGE_URL + split[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1027,6 +1209,7 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
this.avatarPath = path;
|
||||
avatarUrl = null;
|
||||
avatarImageView.setImageURI("file://" + this.avatarPath);
|
||||
uploadAvatar(avatarPath);
|
||||
return;
|
||||
}
|
||||
if (null != path && !TextUtils.isEmpty(path)) {
|
||||
@@ -1069,15 +1252,24 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
|
||||
private boolean isSignature = false;
|
||||
private boolean isJob = false;
|
||||
private boolean isSchool = false;
|
||||
|
||||
private void isChange() {
|
||||
boolean isPhoto = photoChange(mPhotoDataList, mOldPhotoDataList);
|
||||
boolean isPhoto = !TextUtils.isEmpty(album);//photoChange(mPhotoDataList, mOldPhotoDataList);
|
||||
boolean isName = mOldNickName.equals(mNickName.getText());
|
||||
boolean isBirthday = mOldBirthday.equals(mBirthDay.getText());
|
||||
boolean isCity = mOldCity.equals(mCity.getText());
|
||||
//boolean isCity = mOldCity.equals(mCity.getText());
|
||||
boolean avatarChange = TextUtils.isEmpty(avatarPath);
|
||||
boolean isJob = TextUtils.equals(mOldJob, job);
|
||||
if (isName && isBirthday && isCity && avatarChange && isJob && videoFile == null && !isSignature) { //没有改变
|
||||
String height = "";
|
||||
if(TextUtils.isEmpty(settings_info_edit_height.getText().toString())){
|
||||
height = "0CM";
|
||||
}else {
|
||||
height = settings_info_edit_height.getText().toString();
|
||||
}
|
||||
boolean isHeight = mOldHeight.equals(height.replace("CM",""));
|
||||
//boolean isSchool = mOldSchool.equals(settings_info_edit_school.getText().toString());
|
||||
if (isName && isBirthday && isHeight && avatarChange && !isJob && !isSchool && videoFile == null && !isSignature) { //没有改变
|
||||
if (!isPhoto) {
|
||||
finish();
|
||||
} else {
|
||||
@@ -1123,21 +1315,21 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
private List<String> options1Items = new ArrayList<>();
|
||||
private ArrayList<ArrayList<String>> options2Items = new ArrayList<>();
|
||||
|
||||
private void initOptionPicker() {//条件选择器初始化
|
||||
/* private void initOptionPicker() {//条件选择器初始化
|
||||
options1Items.clear();
|
||||
options2Items.clear();
|
||||
String s = SysSPUtils.getString(this, ConsUser.PROFILE);
|
||||
Gson gson = new Gson();
|
||||
GlobalConfigBean.ProfileBean bean = gson.fromJson(s, GlobalConfigBean.ProfileBean.class);
|
||||
if(bean != null && bean.getJob_list().size() > 0) {
|
||||
if (bean != null && bean.getJob_list().size() > 0) {
|
||||
for (int i = 0; i < bean.getJob_list().size(); i++) {
|
||||
options1Items.add(bean.getJob_list().get(i).getName());
|
||||
options2Items.add(bean.getJob_list().get(i).getMenu());
|
||||
}
|
||||
}
|
||||
/**
|
||||
*//**
|
||||
* 注意 :如果是三级联动的数据(省市区等),请参照 JsonDataActivity 类里面的写法。
|
||||
*/
|
||||
*//*
|
||||
pvOptions = new OptionsPickerBuilder(this, new OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int options1, int options2, int options3, View v) {
|
||||
@@ -1146,7 +1338,7 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
String occupation = options2Items.get(options1).get(options2);
|
||||
mJob.setText(occupation);
|
||||
job = options1Items.get(options1) + "-" + options2Items.get(options1).get(options2);
|
||||
if (ConstUrl.LOGDEBUG) Log.i(TAG, "onOptionsSelect: ----------->" + job);
|
||||
if (ConstUrl.LOGDEBUG) Log.i(TAG, "onOptionsSelect: ----------->" + job);
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1167,7 +1359,95 @@ public class InfoEditActivity extends BaseActivity implements View.OnClickListen
|
||||
if (options1Items.size() > 0 && options2Items.size() > 0) {
|
||||
pvOptions.setPicker(options1Items, options2Items);//二级选择器
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public int calculateAge(String birthDateString) {
|
||||
LocalDate birthDate = LocalDate.parse(birthDateString, FORMATTER);
|
||||
LocalDate today = LocalDate.now();
|
||||
int age = Period.between(birthDate, today).getYears();
|
||||
return age;
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public String getZodiac(String birthDateString) {
|
||||
LocalDate birthDate = LocalDate.parse(birthDateString, FORMATTER);
|
||||
int month = birthDate.getMonthValue();
|
||||
int day = birthDate.getDayOfMonth();
|
||||
|
||||
String chinese;
|
||||
if ((month == 1 && day >= 20) || (month == 2 && day <= 18)) {
|
||||
chinese = "水瓶座";
|
||||
} else if ((month == 2 && day >= 19) || (month == 3 && day <= 20)) {
|
||||
chinese = "双鱼座";
|
||||
} else if ((month == 3 && day >= 21) || (month == 4 && day <= 19)) {
|
||||
chinese = "白羊座";
|
||||
} else if ((month == 4 && day >= 20) || (month == 5 && day <= 20)) {
|
||||
chinese = "金牛座";
|
||||
} else if ((month == 5 && day >= 21) || (month == 6 && day <= 20)) {
|
||||
chinese = "双子座";
|
||||
} else if ((month == 6 && day >= 21) || (month == 7 && day <= 22)) {
|
||||
chinese = "巨蟹座";
|
||||
} else if ((month == 7 && day >= 23) || (month == 8 && day <= 22)) {
|
||||
chinese = "狮子座";
|
||||
} else if ((month == 8 && day >= 23) || (month == 9 && day <= 22)) {
|
||||
chinese = "处女座";
|
||||
} else if ((month == 9 && day >= 23) || (month == 10 && day <= 22)) {
|
||||
chinese = "天秤座";
|
||||
} else if ((month == 10 && day >= 23) || (month == 11 && day <= 21)) {
|
||||
chinese = "天蝎座";
|
||||
} else if ((month == 11 && day >= 22) || (month == 12 && day <= 21)) {
|
||||
chinese = "射手座";
|
||||
} else {
|
||||
chinese = "摩羯座";
|
||||
}
|
||||
return chinese;
|
||||
}
|
||||
|
||||
public List<String> heightLists=new ArrayList<>();
|
||||
private OptionsPickerView pvHeighttions;
|
||||
|
||||
private void initHeightOptionPicker() {//条件选择器初始化
|
||||
heightLists.clear();
|
||||
for (int i = 160; i < 191; i++) {
|
||||
heightLists.add(i+"CM");
|
||||
}
|
||||
/**
|
||||
* 注意 :如果是三级联动的数据(省市区等),请参照 JsonDataActivity 类里面的写法。
|
||||
*/
|
||||
pvHeighttions = new OptionsPickerBuilder(this, new OnOptionsSelectListener() {
|
||||
@Override
|
||||
public void onOptionsSelect(int options1, int options2, int options3, View v) {
|
||||
//返回的分别是三个级别的选中位置
|
||||
if (heightLists.size() > 0) {
|
||||
String occupation = heightLists.get(options1);
|
||||
settings_info_edit_height.setText(occupation);
|
||||
height = heightLists.get(options1).replace("CM","");
|
||||
}
|
||||
}
|
||||
})
|
||||
.setTitleText("身高")
|
||||
.setSelectOptions(0, 0)//默认选中项
|
||||
.setTitleBgColor(Color.WHITE)
|
||||
.isRestoreItem(true)//切换时是否还原,设置默认选中第一项。
|
||||
.isCenterLabel(false) //是否只显示中间选中项的label文字,false则每项item全部都带有label。
|
||||
.setOptionsSelectChangeListener(new OnOptionsSelectChangeListener() {
|
||||
@Override
|
||||
public void onOptionsSelectChanged(int options1, int options2, int options3) {
|
||||
String str = "options1: " + options1 + "\noptions2: " + options2 + "\noptions3: " + options3;
|
||||
//Toast.makeText(MainActivity.this, str, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
})
|
||||
.build();
|
||||
|
||||
if (heightLists.size() > 0) {
|
||||
pvHeighttions.setPicker(heightLists);//二级选择器
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ public class InvitationActivity extends BaseActivity implements
|
||||
binding.fourLabel.setText(result.getReward().getFour() + "");
|
||||
posterList = result.getAvatar_list();
|
||||
binding.totalPeopleLabel.setText(result.getTotal().getTotal_invite() + "");
|
||||
binding.totalRewardLabel.setText(result.getTotal().getTotal_invite_reward() + "");
|
||||
binding.totalRewardLabel.setText(result.getTotal().getTotal_commission_coin() + "");
|
||||
binding.totalTiChengLabel.setText(result.getTotal().getAuth_count() + "");
|
||||
|
||||
tv_rule_txt.setText(result.getInvite_rule());
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.xuebiping.bolizhuzi.view.settings;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.fengliyan.uikit.dialog.BaseMessageDialog;
|
||||
import com.xuebiping.bolizhuzi.R;
|
||||
import com.xuebiping.bolizhuzi.utils.StrU;
|
||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||
|
||||
public class PersonalJobActivity extends BaseActivity implements View.OnClickListener {
|
||||
private RelativeLayout tv_finish;
|
||||
private TextView tv_save;
|
||||
private EditText et_signature;
|
||||
private TextView tv_text_num;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle onSavedInstance) {
|
||||
super.onCreate(onSavedInstance);
|
||||
setContentView(R.layout.activity_personal_job);
|
||||
hideTitleBar();
|
||||
initView();
|
||||
et_signature.setText(getIntent().getStringExtra("job"));
|
||||
et_signature.setSelection(et_signature.getText().length());
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
tv_finish = findViewById(R.id.rl_finish);
|
||||
tv_save = findViewById(R.id.tv_save);
|
||||
et_signature = findViewById(R.id.nick_name_edit_input);
|
||||
tv_text_num = findViewById(R.id.tv_text_num);
|
||||
|
||||
tv_finish.setOnClickListener(this);
|
||||
tv_save.setOnClickListener(this);
|
||||
et_signature.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
//tv_text_num.setText(et_signature.getText().toString().length() + "/20");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (view == tv_finish) {
|
||||
saveDialog();
|
||||
} else if (view == tv_save) {
|
||||
String signature = et_signature.getText().toString();
|
||||
setResult(RESULT_OK, new Intent().putExtra("job", signature));
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
saveDialog();
|
||||
}
|
||||
|
||||
private BaseMessageDialog saveDialog;
|
||||
|
||||
public void saveDialog() {
|
||||
if (!StrU.isEmpty(et_signature.getText().toString())) {
|
||||
saveDialog = new BaseMessageDialog.Builder(this).setMessage("是否保存?")
|
||||
.setCancelable(true)
|
||||
.setPositiveButtonListener(new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
saveDialog.dismiss();
|
||||
String signature = et_signature.getText().toString();
|
||||
setResult(RESULT_OK, new Intent().putExtra("job", signature));
|
||||
finish();
|
||||
}
|
||||
}).setNegative("取消").setNegativeButtonListener(new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
saveDialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
}).build();
|
||||
saveDialog.show();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.xuebiping.bolizhuzi.view.settings;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.fengliyan.uikit.dialog.BaseMessageDialog;
|
||||
import com.xuebiping.bolizhuzi.R;
|
||||
import com.xuebiping.bolizhuzi.utils.StrU;
|
||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||
|
||||
public class PersonalSchoolActivity extends BaseActivity implements View.OnClickListener {
|
||||
private RelativeLayout tv_finish;
|
||||
private TextView tv_save;
|
||||
private EditText et_signature;
|
||||
private TextView tv_text_num;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle onSavedInstance) {
|
||||
super.onCreate(onSavedInstance);
|
||||
setContentView(R.layout.activity_personal_school);
|
||||
hideTitleBar();
|
||||
initView();
|
||||
et_signature.setText(getIntent().getStringExtra("school"));
|
||||
et_signature.setSelection(et_signature.getText().length());
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
tv_finish = findViewById(R.id.rl_finish);
|
||||
tv_save = findViewById(R.id.tv_save);
|
||||
et_signature = findViewById(R.id.nick_name_edit_input);
|
||||
tv_text_num = findViewById(R.id.tv_text_num);
|
||||
|
||||
tv_finish.setOnClickListener(this);
|
||||
tv_save.setOnClickListener(this);
|
||||
et_signature.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
//tv_text_num.setText(et_signature.getText().toString().length() + "/20");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (view == tv_finish) {
|
||||
saveDialog();
|
||||
} else if (view == tv_save) {
|
||||
String signature = et_signature.getText().toString();
|
||||
setResult(RESULT_OK, new Intent().putExtra("school", signature));
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
saveDialog();
|
||||
}
|
||||
|
||||
private BaseMessageDialog saveDialog;
|
||||
|
||||
public void saveDialog() {
|
||||
if (!StrU.isEmpty(et_signature.getText().toString())) {
|
||||
saveDialog = new BaseMessageDialog.Builder(this).setMessage("是否保存?")
|
||||
.setCancelable(true)
|
||||
.setPositiveButtonListener(new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
saveDialog.dismiss();
|
||||
String signature = et_signature.getText().toString();
|
||||
setResult(RESULT_OK, new Intent().putExtra("school", signature));
|
||||
finish();
|
||||
}
|
||||
}).setNegative("取消").setNegativeButtonListener(new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
saveDialog.dismiss();
|
||||
finish();
|
||||
}
|
||||
}).build();
|
||||
saveDialog.show();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class PersonalSignatureActivity extends BaseActivity implements View.OnCl
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
tv_text_num.setText(et_signature.getText().toString().length() + "/20");
|
||||
//tv_text_num.setText(et_signature.getText().toString().length() + "/20");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,469 @@
|
||||
package com.xuebiping.bolizhuzi.view.settings;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.fengliyan.http.httprequest.UploadFile;
|
||||
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||
import com.fengliyan.uikit.sketch.SketchImageView;
|
||||
import com.fengliyan.uikit.toast.MaleToast;
|
||||
import com.hjq.permissions.OnPermissionCallback;
|
||||
import com.hjq.permissions.XXPermissions;
|
||||
import com.xuebiping.bolizhuzi.R;
|
||||
import com.xuebiping.bolizhuzi.controller.constant.Constant;
|
||||
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||
import com.xuebiping.bolizhuzi.controller.settings.adapter.InfoEditPhotoRecyclerAdapter;
|
||||
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||
import com.xuebiping.bolizhuzi.controller.settings.manager.UserAvatarManager;
|
||||
import com.xuebiping.bolizhuzi.model.dynamics.UploadImageBean;
|
||||
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
||||
import com.xuebiping.bolizhuzi.utils.SimpleItemTouchCallBack;
|
||||
import com.xuebiping.bolizhuzi.utils.StrU;
|
||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||
import com.xuebiping.bolizhuzi.view.base.utils.ImageUtils;
|
||||
import com.xuebiping.bolizhuzi.view.diooto.Diooto;
|
||||
import com.xuebiping.bolizhuzi.view.diooto.config.DiootoConfig;
|
||||
import com.xuebiping.bolizhuzi.view.diooto.tools.Utils;
|
||||
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
||||
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class PhotoListTwoActivity extends BaseActivity implements UserAvatarManager.UserImgListener {
|
||||
|
||||
private RecyclerView mPhotoListView;
|
||||
private InfoEditPhotoRecyclerAdapter mPhotoAdapter;
|
||||
|
||||
private String[] permissions = {Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_PHONE_STATE};
|
||||
|
||||
private List<String> mPhotoDataList = new ArrayList<String>() {
|
||||
{
|
||||
add("selector");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
}
|
||||
};
|
||||
|
||||
private List<String> mOldPhotoDataList = new ArrayList<String>() {
|
||||
{
|
||||
add("selector");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
add("");
|
||||
}
|
||||
};
|
||||
|
||||
private MultiImageSelector mSelector;
|
||||
private PermissionDialog permissionDialog;
|
||||
|
||||
private UserAvatarManager mManager;
|
||||
public static final int MULTI_SELECTOR_REQUEST = 200;
|
||||
private HashMap<Integer, Integer> photoListIndexMap;
|
||||
private StringBuilder mImages;
|
||||
private String album;
|
||||
private List<String> albumList=new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_photo_list_two);
|
||||
setTitleName("相册");
|
||||
|
||||
mSelector = MultiImageSelector.create().multi().count(9);
|
||||
|
||||
mManager = new UserAvatarManager(this);
|
||||
|
||||
Intent intent = getIntent();
|
||||
album = intent.getStringExtra("album");
|
||||
|
||||
if(!TextUtils.isEmpty(album)) {
|
||||
if(album.contains(",")){
|
||||
String[] split = album.split(",");
|
||||
if(split.length > 0) {
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
albumList.add(split[i]);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
albumList.add(album);
|
||||
}
|
||||
}
|
||||
|
||||
initView();
|
||||
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mPhotoListView = findViewById(R.id.rv_list);
|
||||
|
||||
mPhotoListView.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
mPhotoListView.setNestedScrollingEnabled(false);
|
||||
ViewGroup.LayoutParams layoutParams = mPhotoListView.getLayoutParams();
|
||||
layoutParams.height = Utils.dip2px(this, 360);
|
||||
mPhotoListView.setLayoutParams(layoutParams);
|
||||
|
||||
mPhotoAdapter = new InfoEditPhotoRecyclerAdapter(this);
|
||||
mPhotoAdapter.setPhotoList(mPhotoDataList);
|
||||
mPhotoAdapter.setOnSelectorClickedListener(new InfoEditPhotoRecyclerAdapter
|
||||
.OnSelectorClickedListener() {
|
||||
@Override
|
||||
public void onSelectorClicked() {
|
||||
checkPermission(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickImage(List<String> mPhotoList, int position) {
|
||||
if (null != mPhotoList && mPhotoList.size() != 0) {
|
||||
List<String> imageUrl = new ArrayList<>();
|
||||
for (String imagePath : mPhotoList) {
|
||||
if (!TextUtils.isEmpty(imagePath) && !imagePath.equals("selector")) {
|
||||
if (imagePath.contains("uploads/")) {
|
||||
imageUrl.add(StrU.getResourcePath(imagePath, PhotoListTwoActivity.this));
|
||||
} else {
|
||||
imageUrl.add("file://" + imagePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
clickImage((ArrayList<String>) imageUrl, position);
|
||||
}
|
||||
}
|
||||
});
|
||||
mPhotoListView.setAdapter(mPhotoAdapter);
|
||||
// 拖拽移动和左滑删除
|
||||
SimpleItemTouchCallBack simpleItemTouchCallBack = new SimpleItemTouchCallBack(mPhotoAdapter);
|
||||
ItemTouchHelper helper = new ItemTouchHelper(simpleItemTouchCallBack);
|
||||
helper.attachToRecyclerView(mPhotoListView);
|
||||
|
||||
findViewById(R.id.submit_button).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//这里需要调接口上传 提交
|
||||
updateData();
|
||||
}
|
||||
});
|
||||
|
||||
int size = albumList.size();
|
||||
if (size > 0) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
mPhotoDataList.set(i, albumList.get(i));
|
||||
mOldPhotoDataList.set(i, albumList.get(i));
|
||||
|
||||
}
|
||||
if (size < 9) {
|
||||
mPhotoDataList.set(size, "selector");
|
||||
mOldPhotoDataList.set(size, "selector");
|
||||
}
|
||||
mPhotoAdapter.setPhotoList(mPhotoDataList);
|
||||
mPhotoAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type 0.封面视频 1.头像 2.相册
|
||||
*/
|
||||
private void checkPermission(int type) {
|
||||
permissionDialog = new PermissionDialog(PhotoListTwoActivity.this, permissions);
|
||||
permissionDialog.show();
|
||||
XXPermissions.with(PhotoListTwoActivity.this)
|
||||
.permission(permissions)
|
||||
.request(new OnPermissionCallback() {
|
||||
@Override
|
||||
public void onGranted(List<String> permissions, boolean all) {
|
||||
if (all) {
|
||||
permissionDialog.dismiss();
|
||||
startImageSelector();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDenied(List<String> permissions, boolean never) {
|
||||
if (never) {
|
||||
CustomAlertDialog customAlertDialog = new CustomAlertDialog(PhotoListTwoActivity.this);
|
||||
customAlertDialog.setTitle("芊颜需要开启读写权限,以便查看本地图库内容");
|
||||
customAlertDialog.hideContent(true);
|
||||
customAlertDialog.setRightBtnText("去开启");
|
||||
customAlertDialog.setRightOnClickListener(new CustomAlertDialog.OnDialogRightClickListener() {
|
||||
@Override
|
||||
public void rightClick() {
|
||||
PermissionUtil.jumpPermissionPage(PhotoListTwoActivity.this);
|
||||
}
|
||||
});
|
||||
customAlertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
permissionDialog.dismiss();
|
||||
}
|
||||
});
|
||||
customAlertDialog.show();
|
||||
} else {
|
||||
permissionDialog.dismiss();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳到图片展示页
|
||||
*
|
||||
* @param pathList
|
||||
* @param innerCount
|
||||
*/
|
||||
private void clickImage(ArrayList<String> pathList, int innerCount) {
|
||||
String[] strings = new String[pathList.size()];
|
||||
for (int i = 0; i < pathList.size(); i++) {
|
||||
strings[i] = pathList.get(i);
|
||||
}
|
||||
Diooto diooto = new Diooto(this)
|
||||
.urls(strings)
|
||||
.type(DiootoConfig.PHOTO)
|
||||
.immersive(true)
|
||||
.position(innerCount, 0)
|
||||
.views(mPhotoListView, R.id.info_edit_photo_normal, pathList.size())
|
||||
.loadPhotoBeforeShowBigImage(new Diooto.OnLoadPhotoBeforeShowBigImageListener() {
|
||||
@Override
|
||||
public void loadView(SketchImageView sketchImageView, int position) {
|
||||
sketchImageView.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
|
||||
public void startImageSelector() {
|
||||
mSelector.multi();
|
||||
mSelector.count(1);
|
||||
mSelector.start(this, MULTI_SELECTOR_REQUEST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
// if (isChooseVideo) {
|
||||
// helper.onGetLocalVideoResult(data);
|
||||
// return;
|
||||
// }
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (mManager != null) {
|
||||
mManager.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
if (requestCode == MULTI_SELECTOR_REQUEST && resultCode == RESULT_OK) {
|
||||
List<String> albumList = data.getStringArrayListExtra(MultiImageSelector.EXTRA_RESULT);
|
||||
String s = "file://" + albumList.get(0);
|
||||
mManager.whoStartCropWithUi(Uri.parse(s));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getUserImg(@Nullable final String path) {
|
||||
if (null != path && !TextUtils.isEmpty(path)) {
|
||||
List<String> albumList = new ArrayList<>();
|
||||
|
||||
albumList.add(path);
|
||||
|
||||
for (int i = 0; i < albumList.size(); i++) {
|
||||
if (8 - i >= 0) {
|
||||
mPhotoDataList.remove(8 - i);
|
||||
}
|
||||
}
|
||||
|
||||
int realSize = 0;
|
||||
for (int i = 0; i < mPhotoDataList.size(); i++) {
|
||||
if (!"".equals(mPhotoDataList.get(i)) && !"selector".equals(mPhotoDataList.get(i))) {
|
||||
realSize++;
|
||||
}
|
||||
}
|
||||
|
||||
mPhotoDataList.addAll(realSize, albumList);
|
||||
mPhotoAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
*/
|
||||
private void updateData() {
|
||||
boolean hasPhoto = false;
|
||||
for (String path : mPhotoDataList) {
|
||||
if (path.equals("") || path.equals("selector")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
hasPhoto = true;
|
||||
}
|
||||
|
||||
if (!hasPhoto) {
|
||||
//editProfile(null);
|
||||
finishActivity();
|
||||
} else {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
compressAndUpload();
|
||||
}
|
||||
}).start();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void compressAndUpload() {
|
||||
List<String> photoList = mPhotoAdapter.getmPhotoList();
|
||||
Iterator<String> i = photoList.iterator();
|
||||
int realSize = 0;
|
||||
int currentListCount = 9;
|
||||
photoListIndexMap = new HashMap<>();
|
||||
for (int index = 0; index < photoList.size(); index++) {
|
||||
String path = photoList.get(index);
|
||||
if ("selector".equals(path)) {
|
||||
currentListCount = index;
|
||||
}
|
||||
if ("".equals(path) || "selector".equals(path) || path.contains("uploads/")) {
|
||||
continue;
|
||||
}
|
||||
photoListIndexMap.put(realSize, index);
|
||||
realSize++;
|
||||
}
|
||||
|
||||
final UploadFile[] uploadFiles = new UploadFile[realSize];
|
||||
int count = 0;
|
||||
while (i.hasNext()) {
|
||||
String path = i.next();
|
||||
if ("".equals(path) || "selector".equals(path) || path.contains("uploads/")) {
|
||||
continue;
|
||||
}
|
||||
path = ImageUtils.compressImage(this, path, Constant.IMAGE_MEMORY_SIZE, true);
|
||||
File file = new File(path);
|
||||
UploadFile uploadFile = new UploadFile("file[" + count + "]", file);
|
||||
uploadFiles[count] = uploadFile;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (null != uploadFiles) {
|
||||
if (uploadFiles.length != 0) {
|
||||
if (uploadFiles[0].getFile().exists()) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
uploadImage(uploadFiles);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
mImages = new StringBuilder();
|
||||
for (int i1 = 0; i1 < currentListCount; i1++) {
|
||||
String str = photoList.get(i1);
|
||||
if (TextUtils.isEmpty(str) || "selector".equals(str)) {
|
||||
continue;
|
||||
}
|
||||
mImages.append(str);
|
||||
if (i1 < currentListCount - 1) {
|
||||
mImages.append(",");
|
||||
}
|
||||
}
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finishActivity();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void uploadImage(final UploadFile[] uploadFiles) {
|
||||
DynamicsManager.uploadImage(this, uploadFiles, "album",
|
||||
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||
mImages = new StringBuilder();
|
||||
List<String> photoList = mPhotoAdapter.getmPhotoList();
|
||||
for (int i = 0; i < result.size(); i++) {
|
||||
Integer integer = photoListIndexMap.get(i);
|
||||
photoList.set(integer, result.get(i).getUrl());
|
||||
}
|
||||
|
||||
for (int i = 0; i < photoList.size(); i++) {
|
||||
String str = photoList.get(i);
|
||||
if (TextUtils.isEmpty(str) || "selector".equals(str)) {
|
||||
continue;
|
||||
}
|
||||
mImages.append(str);
|
||||
if (i < photoList.size() - 1) {
|
||||
mImages.append(",");
|
||||
}
|
||||
}
|
||||
|
||||
photoListIndexMap.clear();
|
||||
|
||||
//上传成功后删掉本地图片
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (UploadFile uploadFile : uploadFiles) {
|
||||
File file = uploadFile.getFile();
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
||||
finishActivity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(BaseActivity activity, String tip) {
|
||||
MaleToast.showMessage(activity, tip);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(BaseActivity activity, Throwable e) {
|
||||
MaleToast.showMessage(activity, "图片上传失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void finishActivity() {
|
||||
Intent intent = new Intent();
|
||||
if(mImages != null) {
|
||||
intent.putExtra("album",mImages.toString());
|
||||
}else {
|
||||
intent.putExtra("album",album);
|
||||
}
|
||||
setResult(206,intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@@ -137,8 +137,6 @@ public class RealNameTwoActivity extends BaseActivity implements UserAvatarManag
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (checkIsEnable()) {
|
||||
//TODO 调接口提交
|
||||
|
||||
if (TextUtils.isEmpty(ed_name.getText().toString().trim())) {
|
||||
ToastHelper.showToast(RealNameTwoActivity.this, "请输入真实姓名");
|
||||
return;
|
||||
|
||||
@@ -98,7 +98,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
private PermissionDialog permissionDialog;
|
||||
|
||||
private TimePickerView mAgePicker;
|
||||
private String[] permissions = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_PHONE_STATE};
|
||||
private String[] permissions = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_PHONE_STATE};
|
||||
|
||||
public static final int MULTI_SELECTOR_REQUEST = 200;
|
||||
public static final int VIDEO_COVER_REQUEST = 501;//封面视频
|
||||
@@ -122,9 +122,9 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
private String sanwwei = "未填写";
|
||||
private int gender = 0;
|
||||
|
||||
String bust = "";
|
||||
String waist = "";
|
||||
String hip = "";
|
||||
String bust = "";
|
||||
String waist = "";
|
||||
String hip = "";
|
||||
|
||||
private UserAvatarManager mManager;
|
||||
private SimpleDraweeView sd_avatar;
|
||||
@@ -255,7 +255,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if(editable.length() > 0) {
|
||||
if (editable.length() > 0) {
|
||||
up_auth_saveSign(editable.toString());
|
||||
}
|
||||
}
|
||||
@@ -274,7 +274,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if(editable.length() > 0) {
|
||||
if (editable.length() > 0) {
|
||||
up_auth_saveJob(editable.toString());
|
||||
}
|
||||
}
|
||||
@@ -282,14 +282,14 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
public void up_auth_detail(){
|
||||
public void up_auth_detail() {
|
||||
SettingManager.up_auth_detail(this, new HttpUiCallBack<UpAuthDetailBean>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, UpAuthDetailBean result, String tips) {
|
||||
if(result != null) {
|
||||
if (result != null) {
|
||||
formDTO = result.getForm();
|
||||
if(formDTO != null) {
|
||||
if (formDTO != null) {
|
||||
sd_avatar.setImageURI(ConstUrl.IMAGE_URL + formDTO.getAvatar());
|
||||
//sd_avatar.setImageURI("http://oss.jindashengkj.cn/uploads/album/202604/02/c0b2434c43939911a34f5dffb03f2101_.pic.jpg");
|
||||
|
||||
@@ -301,7 +301,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
|
||||
avatarUrl = formDTO.getAvatar();
|
||||
|
||||
sd_video_cover.setImageURI(ConstUrl.IMAGE_URL + formDTO.getVideo_url());
|
||||
sd_video_cover.setImageURI(ConstUrl.IMAGE_URL + formDTO.getVideo_cover_url());
|
||||
video_verify_code = formDTO.getVideo_verify_code();
|
||||
video_verify_text = formDTO.getVideo_verify_text();
|
||||
|
||||
@@ -316,51 +316,51 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
|
||||
gender = formDTO.getGender();
|
||||
|
||||
if(!TextUtils.isEmpty(formDTO.getBirthday())){
|
||||
if (!TextUtils.isEmpty(formDTO.getBirthday())) {
|
||||
tv_birthday.setText(formDTO.getBirthday());
|
||||
}
|
||||
|
||||
if(formDTO.getWeight() > 0) {
|
||||
if (formDTO.getWeight() > 0) {
|
||||
tizhong = formDTO.getWeight() + "KG";
|
||||
tv_tiz.setText(formDTO.getWeight()+"KG");
|
||||
tv_tiz.setText(formDTO.getWeight() + "KG");
|
||||
}
|
||||
|
||||
if(formDTO.getHeight() > 0) {
|
||||
height = formDTO.getHeight() +"CM";
|
||||
tv_height.setText(formDTO.getHeight()+"CM");
|
||||
if (formDTO.getHeight() > 0) {
|
||||
height = formDTO.getHeight() + "CM";
|
||||
tv_height.setText(formDTO.getHeight() + "CM");
|
||||
}
|
||||
|
||||
if(formDTO.getBust() > 0) {
|
||||
bust = formDTO.getBust()+"";
|
||||
if (formDTO.getBust() > 0) {
|
||||
bust = formDTO.getBust() + "";
|
||||
}
|
||||
|
||||
if(formDTO.getWaist() > 0) {
|
||||
if (formDTO.getWaist() > 0) {
|
||||
waist = formDTO.getWaist() + "";
|
||||
}
|
||||
|
||||
if(formDTO.getHip() > 0) {
|
||||
if (formDTO.getHip() > 0) {
|
||||
hip = formDTO.getHip() + "";
|
||||
}
|
||||
tv_sanwei.setText(formDTO.getBust() + " " + formDTO.getWaist() + " " + formDTO.getHip());
|
||||
|
||||
if(!TextUtils.isEmpty(formDTO.getConstellation())){
|
||||
if (!TextUtils.isEmpty(formDTO.getConstellation())) {
|
||||
xingzuo = formDTO.getConstellation();
|
||||
tv_xz.setText(formDTO.getConstellation());
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(formDTO.getCity_name())){
|
||||
mCityId = formDTO.getCity_id()+"";
|
||||
if (!TextUtils.isEmpty(formDTO.getCity_name())) {
|
||||
mCityId = formDTO.getCity_id() + "";
|
||||
tv_city.setText(formDTO.getCity_name());
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(formDTO.getWechat_no())){
|
||||
if (!TextUtils.isEmpty(formDTO.getWechat_no())) {
|
||||
wxCode = formDTO.getWechat_no();
|
||||
tv_wxcode.setText(formDTO.getWechat_no());
|
||||
}
|
||||
|
||||
List<String> album_images = formDTO.getAlbum_images();
|
||||
if(album_images != null && album_images.size() > 0) {
|
||||
album = album_images.toString().replace("]","").replace("[","");
|
||||
if (album_images != null && album_images.size() > 0) {
|
||||
album = album_images.toString().replace("]", "").replace("[", "");
|
||||
//Log.i("TAG666","相册 - == "+ album);
|
||||
sd_photo.setImageURI(ConstUrl.IMAGE_URL + album_images.get(0));
|
||||
}
|
||||
@@ -370,43 +370,44 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
|
||||
UpAuthDetailBean.SectionStatusDTO section_status = result.getSection_status();
|
||||
if(section_status != null) {
|
||||
if (section_status != null) {
|
||||
UpAuthDetailBean.SectionStatusDTO.IdentityDTO identity = section_status.getIdentity();
|
||||
tv_card.setText(identity.getText());
|
||||
if(identity.getStatus() == 2) {
|
||||
if (identity.getStatus() == 2) {
|
||||
rl_card_layout.setEnabled(false);
|
||||
}else {
|
||||
} else {
|
||||
rl_card_layout.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
UpAuthDetailBean.SectionStatusDTO.VideoCoverDTO video_cover = section_status.getVideo_cover();
|
||||
if(video_cover != null) {
|
||||
if(video_cover.getStatus() == 2) {
|
||||
if (video_cover != null) {
|
||||
if (video_cover.getStatus() == 2) {
|
||||
rl_video_cover_layout.setEnabled(false);
|
||||
}else {
|
||||
} else {
|
||||
rl_video_cover_layout.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
UpAuthDetailBean.SectionStatusDTO.VideoVerifyDTO video_verify = section_status.getVideo_verify();
|
||||
if(video_verify != null) {
|
||||
tv_video_rz.setText(video_cover.getText());
|
||||
if(video_verify.getStatus() == 2) {
|
||||
if (video_verify != null) {
|
||||
tv_video_rz.setText(video_verify.getText());
|
||||
if (video_verify.getStatus() == 2) {
|
||||
rl_video_rz_layout.setEnabled(false);
|
||||
}else {
|
||||
} else {
|
||||
rl_video_rz_layout.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(result.getStatus() == 2) { //当前已审核通过
|
||||
if (result.getStatus() == 2) { //当前已审核通过
|
||||
submit_button.setText("已通过");
|
||||
btnStatus(false);
|
||||
}if(result.getStatus() == 1) {
|
||||
}
|
||||
if (result.getStatus() == 1) {
|
||||
submit_button.setText("审核中");
|
||||
btnStatus(false);
|
||||
}else {
|
||||
} else {
|
||||
btnStatus(true);
|
||||
}
|
||||
}
|
||||
@@ -424,7 +425,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
public void btnStatus(boolean status){
|
||||
public void btnStatus(boolean status) {
|
||||
tv_nikename.setEnabled(status);
|
||||
tv_sign.setEnabled(status);
|
||||
tv_zybq.setEnabled(status);
|
||||
@@ -453,136 +454,134 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
pvGenderttions.show();
|
||||
} else if (view.getId() == R.id.rl_cover_layout) {
|
||||
Intent intent = new Intent(this, UploadPhotoCoverActivity.class);
|
||||
if(formDTO != null) {
|
||||
intent.putExtra("cover",formDTO.getCover_image());
|
||||
if (formDTO != null) {
|
||||
intent.putExtra("cover", formDTO.getCover_image());
|
||||
}
|
||||
startActivityForResult(intent,202);
|
||||
startActivityForResult(intent, 202);
|
||||
} else if (view.getId() == R.id.rl_card_layout) {
|
||||
Intent intent = new Intent(this, RealNameTwoActivity.class);
|
||||
if(formDTO != null) {
|
||||
intent.putExtra("real_name",formDTO.getReal_name());
|
||||
intent.putExtra("ic_card_no",formDTO.getId_card_no());
|
||||
intent.putExtra("ic_card_front",formDTO.getId_card_front());
|
||||
intent.putExtra("ic_card_back",formDTO.getId_card_back());
|
||||
intent.putExtra("ic_card_hold",formDTO.getId_card_hold());
|
||||
if (formDTO != null) {
|
||||
intent.putExtra("real_name", formDTO.getReal_name());
|
||||
intent.putExtra("ic_card_no", formDTO.getId_card_no());
|
||||
intent.putExtra("ic_card_front", formDTO.getId_card_front());
|
||||
intent.putExtra("ic_card_back", formDTO.getId_card_back());
|
||||
intent.putExtra("ic_card_hold", formDTO.getId_card_hold());
|
||||
}
|
||||
startActivityForResult(intent,203);
|
||||
startActivityForResult(intent, 203);
|
||||
} else if (view.getId() == R.id.rl_video_rz_layout) {
|
||||
Intent intent = new Intent(this, VideoRenzhengActivity.class);
|
||||
intent.putExtra("video_code",video_verify_code);
|
||||
intent.putExtra("video_text",video_verify_text);
|
||||
startActivityForResult(intent,204);
|
||||
intent.putExtra("video_code", video_verify_code);
|
||||
intent.putExtra("video_text", video_verify_text);
|
||||
startActivityForResult(intent, 204);
|
||||
} else if (view.getId() == R.id.rl_birthday_layout) {
|
||||
mAgePicker.show();
|
||||
} else if (view.getId() == R.id.rl_wxcode_layout) {
|
||||
Intent intent = new Intent(this, WxCodeActivity.class);
|
||||
if(formDTO != null) {
|
||||
intent.putExtra("wxCode",formDTO.getWechat_no());
|
||||
}
|
||||
intent.putExtra("wxCode", wxCode);
|
||||
startActivityForResult(intent, 205);
|
||||
} else if (view.getId() == R.id.rl_sanwei_layout) {
|
||||
pvSanWeittions.show();
|
||||
} else if (view.getId() == R.id.rl_photo_layout) {
|
||||
Intent intent = new Intent(this, PhotoListActivity.class);
|
||||
if(formDTO != null) {
|
||||
if (formDTO != null) {
|
||||
intent.putStringArrayListExtra("album", (ArrayList<String>) formDTO.getAlbum_images());
|
||||
}
|
||||
startActivityForResult(intent,206);
|
||||
}else if (view.getId() == R.id.rl_height_layout) {
|
||||
startActivityForResult(intent, 206);
|
||||
} else if (view.getId() == R.id.rl_height_layout) {
|
||||
pvHeighttions.show();
|
||||
}else if (view.getId() == R.id.rl_tiz_layout) {
|
||||
} else if (view.getId() == R.id.rl_tiz_layout) {
|
||||
pvTiZhongttions.show();
|
||||
}else if (view.getId() == R.id.rl_xz_layout) {
|
||||
} else if (view.getId() == R.id.rl_xz_layout) {
|
||||
pvXingZuottions.show();
|
||||
}else if (view.getId() == R.id.rl_video_cover_layout) {
|
||||
} else if (view.getId() == R.id.rl_video_cover_layout) {
|
||||
checkPermission(0);
|
||||
}else if (view.getId() == R.id.rl_city_layout) {
|
||||
} else if (view.getId() == R.id.rl_city_layout) {
|
||||
Intent intent = new Intent(this, CityPickerActivity.class);
|
||||
startActivityForResult(intent, 1001);
|
||||
}else if (view.getId() == R.id.submit_button) {
|
||||
} else if (view.getId() == R.id.submit_button) {
|
||||
//这个调提交接口
|
||||
if(TextUtils.isEmpty(tv_nikename.getText().toString())){
|
||||
ToastHelper.showToast(this,"未输入昵称");
|
||||
if (TextUtils.isEmpty(tv_nikename.getText().toString())) {
|
||||
ToastHelper.showToast(this, "未输入昵称");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(avatarUrl)){
|
||||
ToastHelper.showToast(this,"未上传头像");
|
||||
if (TextUtils.isEmpty(avatarUrl)) {
|
||||
ToastHelper.showToast(this, "未上传头像");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(tv_sign.getText().toString().trim())){
|
||||
ToastHelper.showToast(this,"未输入签名");
|
||||
if (TextUtils.isEmpty(tv_sign.getText().toString().trim())) {
|
||||
ToastHelper.showToast(this, "未输入签名");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(tv_gender.getText().toString().trim())){
|
||||
ToastHelper.showToast(this,"未选择性别");
|
||||
if (TextUtils.isEmpty(tv_gender.getText().toString().trim())) {
|
||||
ToastHelper.showToast(this, "未选择性别");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(tv_zybq.getText().toString().trim())){
|
||||
ToastHelper.showToast(this,"未输入职业标签");
|
||||
if (TextUtils.isEmpty(tv_zybq.getText().toString().trim())) {
|
||||
ToastHelper.showToast(this, "未输入职业标签");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(cover)){
|
||||
ToastHelper.showToast(this,"未选择封面图");
|
||||
if (TextUtils.isEmpty(cover)) {
|
||||
ToastHelper.showToast(this, "未选择封面图");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(real_name)){
|
||||
ToastHelper.showToast(this,"未进行身份认证");
|
||||
if (TextUtils.isEmpty(real_name)) {
|
||||
ToastHelper.showToast(this, "未进行身份认证");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(videoRzUrl)){
|
||||
ToastHelper.showToast(this,"未进行视频认证");
|
||||
if (TextUtils.isEmpty(videoRzUrl)) {
|
||||
ToastHelper.showToast(this, "未进行视频认证");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(tv_birthday.getText().toString().trim())){
|
||||
ToastHelper.showToast(this,"未选择出生日期");
|
||||
if (TextUtils.isEmpty(tv_birthday.getText().toString().trim())) {
|
||||
ToastHelper.showToast(this, "未选择出生日期");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(wxCode)){
|
||||
ToastHelper.showToast(this,"未添加微信号");
|
||||
if (TextUtils.isEmpty(wxCode)) {
|
||||
ToastHelper.showToast(this, "未添加微信号");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(sanwwei)){
|
||||
ToastHelper.showToast(this,"未填写三围信息");
|
||||
if (TextUtils.isEmpty(sanwwei)) {
|
||||
ToastHelper.showToast(this, "未填写三围信息");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(album)){
|
||||
ToastHelper.showToast(this,"未上传相册");
|
||||
if (TextUtils.isEmpty(album)) {
|
||||
ToastHelper.showToast(this, "未上传相册");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(videoCoverUrl)){
|
||||
ToastHelper.showToast(this,"未上传视频信息");
|
||||
if (TextUtils.isEmpty(videoCoverUrl)) {
|
||||
ToastHelper.showToast(this, "未上传视频信息");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(height)){
|
||||
ToastHelper.showToast(this,"未填写身高");
|
||||
if (TextUtils.isEmpty(height)) {
|
||||
ToastHelper.showToast(this, "未填写身高");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(tizhong)){
|
||||
ToastHelper.showToast(this,"未填写体重");
|
||||
if (TextUtils.isEmpty(tizhong)) {
|
||||
ToastHelper.showToast(this, "未填写体重");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(xingzuo)){
|
||||
ToastHelper.showToast(this,"未填写星座");
|
||||
if (TextUtils.isEmpty(xingzuo)) {
|
||||
ToastHelper.showToast(this, "未填写星座");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(tv_city.getText().toString().trim())){
|
||||
ToastHelper.showToast(this,"未填写城市");
|
||||
if (TextUtils.isEmpty(tv_city.getText().toString().trim())) {
|
||||
ToastHelper.showToast(this, "未填写城市");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -734,40 +733,44 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if(requestCode == 202){ //上传封面图返回
|
||||
//TODO
|
||||
if(data != null) {
|
||||
String pathcover = data.getStringExtra("cover");
|
||||
} else if (requestCode == 202) { //上传封面图返回
|
||||
if (data != null) {
|
||||
cover = data.getStringExtra("upload_cover");
|
||||
sd_cover.setImageURI("file://" + pathcover);
|
||||
if(!TextUtils.isEmpty(cover)) {
|
||||
sd_cover.setImageURI("file://" + cover);
|
||||
up_auth_detail();
|
||||
}
|
||||
}
|
||||
}else if(requestCode == 203){ //修改身份认证状态
|
||||
//TODO
|
||||
if(data != null) {
|
||||
} else if (requestCode == 203) { //修改身份认证状态
|
||||
if (data != null) {
|
||||
id_card_front = data.getStringExtra("id_card_front");
|
||||
id_card_back = data.getStringExtra("id_card_back");
|
||||
id_card_hold = data.getStringExtra("id_card_hold");
|
||||
real_name = data.getStringExtra("real_name");
|
||||
id_card_no = data.getStringExtra("id_card_no");
|
||||
tv_card.setText("已填写");
|
||||
if (!TextUtils.isEmpty(id_card_no)
|
||||
&& !TextUtils.isEmpty(real_name)
|
||||
&& !TextUtils.isEmpty(id_card_front)
|
||||
&& !TextUtils.isEmpty(id_card_back)
|
||||
&& !TextUtils.isEmpty(id_card_hold))
|
||||
tv_card.setText("已填写");
|
||||
}
|
||||
}else if(requestCode == 204){ //视频认证结果
|
||||
//TODO
|
||||
if(data != null) {
|
||||
} else if (requestCode == 204) { //视频认证结果
|
||||
if (data != null) {
|
||||
videoRzUrl = data.getStringExtra("videoUrl");
|
||||
if(!TextUtils.isEmpty(videoRzUrl)){
|
||||
if (!TextUtils.isEmpty(videoRzUrl)) {
|
||||
tv_video_rz.setText("已填写");
|
||||
}
|
||||
}
|
||||
}else if(requestCode == 205){
|
||||
if(data != null) {
|
||||
} else if (requestCode == 205) {
|
||||
if (data != null) {
|
||||
wxCode = data.getStringExtra("wxCode");
|
||||
tv_wxcode.setText(wxCode);
|
||||
}
|
||||
}else if(requestCode == 206){
|
||||
if(data != null) {
|
||||
} else if (requestCode == 206) {
|
||||
if (data != null) {
|
||||
album = data.getStringExtra("album");
|
||||
if(!TextUtils.isEmpty(album) && album.contains(",")) {
|
||||
if (!TextUtils.isEmpty(album) && album.contains(",")) {
|
||||
String[] split = album.split(",");
|
||||
if (split.length > 0) {
|
||||
sd_photo.setImageURI(ConstUrl.IMAGE_URL + split[0]);
|
||||
@@ -830,12 +833,12 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> heightLists=new ArrayList<>();
|
||||
public List<String> heightLists = new ArrayList<>();
|
||||
|
||||
private void initHeightOptionPicker() {//条件选择器初始化
|
||||
heightLists.clear();
|
||||
for (int i = 160; i < 191; i++) {
|
||||
heightLists.add(i+"CM");
|
||||
heightLists.add(i + "CM");
|
||||
}
|
||||
/**
|
||||
* 注意 :如果是三级联动的数据(省市区等),请参照 JsonDataActivity 类里面的写法。
|
||||
@@ -871,12 +874,12 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> tiZhongLists=new ArrayList<>();
|
||||
public List<String> tiZhongLists = new ArrayList<>();
|
||||
|
||||
private void initTiZhongOptionPicker() {//条件选择器初始化
|
||||
tiZhongLists.clear();
|
||||
for (int i = 40; i < 71; i++) {
|
||||
tiZhongLists.add(i+"KG");
|
||||
tiZhongLists.add(i + "KG");
|
||||
}
|
||||
/**
|
||||
* 注意 :如果是三级联动的数据(省市区等),请参照 JsonDataActivity 类里面的写法。
|
||||
@@ -913,7 +916,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
|
||||
private void initXingZuoOptionPicker() {//条件选择器初始化
|
||||
List<String> xzuoLists=new ArrayList<>();
|
||||
List<String> xzuoLists = new ArrayList<>();
|
||||
xzuoLists.clear();
|
||||
xzuoLists.add("水瓶座");
|
||||
xzuoLists.add("双鱼座");
|
||||
@@ -962,17 +965,17 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
|
||||
private void initSanWeiOptionPicker() {//条件选择器初始化
|
||||
List<String> xwLists=new ArrayList<>();
|
||||
List<String> ywLists=new ArrayList<>();
|
||||
List<String> twLists=new ArrayList<>();
|
||||
List<String> xwLists = new ArrayList<>();
|
||||
List<String> ywLists = new ArrayList<>();
|
||||
List<String> twLists = new ArrayList<>();
|
||||
for (int i = 70; i < 106; i++) {
|
||||
xwLists.add(i+"");
|
||||
xwLists.add(i + "");
|
||||
}
|
||||
for (int i = 50; i < 81; i++) {
|
||||
ywLists.add(i+"");
|
||||
ywLists.add(i + "");
|
||||
}
|
||||
for (int i = 80; i < 100; i++) {
|
||||
twLists.add(i+"");
|
||||
twLists.add(i + "");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -982,15 +985,15 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
@Override
|
||||
public void onOptionsSelect(int options1, int options2, int options3, View v) {
|
||||
//返回的分别是三个级别的选中位置
|
||||
if (xwLists.size() > 0 && ywLists.size()> 0 && twLists.size() > 0) {
|
||||
if (xwLists.size() > 0 && ywLists.size() > 0 && twLists.size() > 0) {
|
||||
String occupation = xwLists.get(options1);
|
||||
tv_sanwei.setText(occupation + " " + ywLists.get(options2) +" " + twLists.get(options3));
|
||||
sanwwei = xwLists.get(options1) + " " + ywLists.get(options2) +" " + twLists.get(options3);
|
||||
tv_sanwei.setText(occupation + " " + ywLists.get(options2) + " " + twLists.get(options3));
|
||||
sanwwei = xwLists.get(options1) + " " + ywLists.get(options2) + " " + twLists.get(options3);
|
||||
bust = xwLists.get(options1);
|
||||
waist = ywLists.get(options2);
|
||||
hip = twLists.get(options3);
|
||||
|
||||
up_auth_saveSanwei(bust,waist,hip);
|
||||
up_auth_saveSanwei(bust, waist, hip);
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1008,13 +1011,13 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
})
|
||||
.build();
|
||||
|
||||
if (xwLists.size() > 0 && ywLists.size()> 0 && twLists.size() > 0) {
|
||||
pvSanWeittions.setNPicker(xwLists,ywLists,twLists);//二级选择器
|
||||
if (xwLists.size() > 0 && ywLists.size() > 0 && twLists.size() > 0) {
|
||||
pvSanWeittions.setNPicker(xwLists, ywLists, twLists);//二级选择器
|
||||
}
|
||||
}
|
||||
|
||||
private void initGenderOptionPicker() {//条件选择器初始化
|
||||
List<String> genderLists=new ArrayList<>();
|
||||
List<String> genderLists = new ArrayList<>();
|
||||
genderLists.clear();
|
||||
genderLists.add("男");
|
||||
genderLists.add("女");
|
||||
@@ -1052,39 +1055,39 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
void up_auth_submit(String avatar,
|
||||
String nickname,
|
||||
String signature,
|
||||
int gender,
|
||||
String job,
|
||||
String cover_image,
|
||||
String real_name,
|
||||
String id_card_no,
|
||||
String id_card_front,
|
||||
String id_card_back,
|
||||
String id_card_hold,
|
||||
String video_verify_code,
|
||||
String video_verify_text,
|
||||
String video_verify_video,
|
||||
String birthday,
|
||||
String wechat_no,
|
||||
String album_images,
|
||||
String video_cover_url,
|
||||
String video_url,
|
||||
String height,
|
||||
String weight,
|
||||
String bust,
|
||||
String waist,
|
||||
String hip,
|
||||
String constellation,
|
||||
String city_id){
|
||||
void up_auth_submit(String avatar,
|
||||
String nickname,
|
||||
String signature,
|
||||
int gender,
|
||||
String job,
|
||||
String cover_image,
|
||||
String real_name,
|
||||
String id_card_no,
|
||||
String id_card_front,
|
||||
String id_card_back,
|
||||
String id_card_hold,
|
||||
String video_verify_code,
|
||||
String video_verify_text,
|
||||
String video_verify_video,
|
||||
String birthday,
|
||||
String wechat_no,
|
||||
String album_images,
|
||||
String video_cover_url,
|
||||
String video_url,
|
||||
String height,
|
||||
String weight,
|
||||
String bust,
|
||||
String waist,
|
||||
String hip,
|
||||
String constellation,
|
||||
String city_id) {
|
||||
SettingManager.up_auth_submit(this, avatar, nickname, signature, gender, job, cover_image, real_name,
|
||||
id_card_no, id_card_front, id_card_back, id_card_hold, video_verify_code,
|
||||
video_verify_text, video_verify_video, birthday, wechat_no, album_images, video_cover_url, video_url, height,
|
||||
weight, bust, waist, hip, constellation, city_id, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
ToastHelper.showToast(UpPrivilegeActivity.this,"UP主认证已提交");
|
||||
ToastHelper.showToast(UpPrivilegeActivity.this, "UP主认证已提交");
|
||||
finishActivity();
|
||||
}
|
||||
|
||||
@@ -1112,8 +1115,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
videoCoverUrl = result.get(0).getUrl();
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(videoCoverUrl) && !TextUtils.isEmpty(videoCoverPath)){
|
||||
up_auth_saveVideoCover(videoCoverUrl,videoCoverPath);
|
||||
if (!TextUtils.isEmpty(videoCoverUrl) && !TextUtils.isEmpty(videoCoverPath)) {
|
||||
up_auth_saveVideoCover(videoCoverUrl, videoCoverPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1140,8 +1143,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
videoCoverPath = result.get(0).getUrl();
|
||||
}
|
||||
|
||||
if(!TextUtils.isEmpty(videoCoverUrl) && !TextUtils.isEmpty(videoCoverPath)){
|
||||
up_auth_saveVideoCover(videoCoverUrl,videoCoverPath);
|
||||
if (!TextUtils.isEmpty(videoCoverUrl) && !TextUtils.isEmpty(videoCoverPath)) {
|
||||
up_auth_saveVideoCover(videoCoverUrl, videoCoverPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1157,7 +1160,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveVideoCover(String video_cover_url,String video_url){
|
||||
void up_auth_saveVideoCover(String video_cover_url, String video_url) {
|
||||
SettingManager.up_auth_saveVideoCover(this, video_cover_url, video_url, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
@@ -1202,8 +1205,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveAvatar(String avatar){
|
||||
SettingManager.up_auth_saveAvatar(this, avatar,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveAvatar(String avatar) {
|
||||
SettingManager.up_auth_saveAvatar(this, avatar, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
@@ -1221,8 +1224,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveSanwei(String bust,String waist,String hip){
|
||||
SettingManager.up_auth_saveSanwei(this, bust,waist,hip,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveSanwei(String bust, String waist, String hip) {
|
||||
SettingManager.up_auth_saveSanwei(this, bust, waist, hip, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
@@ -1240,8 +1243,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveHeight(String height){
|
||||
SettingManager.up_auth_saveHeight(this, height,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveHeight(String height) {
|
||||
SettingManager.up_auth_saveHeight(this, height, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
@@ -1259,8 +1262,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveWeight(String weight){
|
||||
SettingManager.up_auth_saveWeight(this, weight,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveWeight(String weight) {
|
||||
SettingManager.up_auth_saveWeight(this, weight, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
@@ -1278,8 +1281,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveConstellation(String constellation){
|
||||
SettingManager.up_auth_saveConstellation(this, constellation,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveConstellation(String constellation) {
|
||||
SettingManager.up_auth_saveConstellation(this, constellation, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
@@ -1297,8 +1300,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveCity(String city){
|
||||
SettingManager.up_auth_saveCity(this, city,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveCity(String city) {
|
||||
SettingManager.up_auth_saveCity(this, city, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
@@ -1316,8 +1319,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveSign(String sign){
|
||||
SettingManager.up_auth_saveSign(this, sign,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveSign(String sign) {
|
||||
SettingManager.up_auth_saveSign(this, sign, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
@@ -1335,8 +1338,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
void up_auth_saveJob(String job){
|
||||
SettingManager.up_auth_saveJob(this, job,new HttpUiCallBack<Object>() {
|
||||
void up_auth_saveJob(String job) {
|
||||
SettingManager.up_auth_saveJob(this, job, new HttpUiCallBack<Object>() {
|
||||
@Override
|
||||
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||
|
||||
|
||||
@@ -94,7 +94,6 @@ public class UploadPhotoCoverActivity extends BaseActivity implements UserAvatar
|
||||
submit_button.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//TODO 做上传操作并返回前个界面
|
||||
|
||||
if (TextUtils.isEmpty(avatarPath)) {
|
||||
MaleToast.showMessage(UploadPhotoCoverActivity.this, "未上传封面图");
|
||||
@@ -183,7 +182,6 @@ public class UploadPhotoCoverActivity extends BaseActivity implements UserAvatar
|
||||
@Override
|
||||
public void finishActivity() {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("cover", avatarPath);
|
||||
intent.putExtra("upload_cover", avatarUrl);
|
||||
setResult(202, intent);
|
||||
finish();
|
||||
|
||||
@@ -60,15 +60,15 @@ public class WxCodeActivity extends BaseActivity implements View.OnClickListener
|
||||
@Override
|
||||
public void finishActivity() {
|
||||
// super.finishActivity();
|
||||
if(TextUtils.isEmpty(mNickNameEdit.getText())){
|
||||
/*if(TextUtils.isEmpty(mNickNameEdit.getText())){
|
||||
MaleToast.showMessage(WxCodeActivity.this, "输入你的微信号");
|
||||
}else {
|
||||
}else {*/
|
||||
if (mName.equals(mNickNameEdit.getText().toString())) { //相等
|
||||
finish();
|
||||
}else {
|
||||
saveDialog();
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
BIN
app/src/main/res/drawable-xxhdpi/ic_card_fm.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_card_fm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_card_sc.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_card_sc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_card_zm.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_card_zm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_photo_empty.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_photo_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_photo_tips.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_photo_tips.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 845 B |
13
app/src/main/res/drawable/custom_progress.xml
Normal file
13
app/src/main/res/drawable/custom_progress.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape><solid android:color="#e0e0e0"/> <corners android:radius="@dimen/dp10"/> </shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress"><clip>
|
||||
<shape>
|
||||
<gradient android:angle="0"
|
||||
android:startColor="#EA6FEE"
|
||||
android:endColor="#EB6969"/> <corners android:radius="@dimen/dp10"/></shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
81
app/src/main/res/layout/activity_personal_job.xml
Normal file
81
app/src/main/res/layout/activity_personal_job.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?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="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:viewBindingIgnore="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="36dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_finish"
|
||||
android:layout_width="@dimen/dp44"
|
||||
android:layout_height="@dimen/dp44">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp16"
|
||||
android:layout_height="@dimen/dp16"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_return"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_finish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="我的职业"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/shape_button_enable"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_finish"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_finish" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:background="@drawable/shape_f9fafc_bg_r14"
|
||||
android:layout_marginHorizontal="@dimen/dp20">
|
||||
<EditText
|
||||
android:id="@+id/nick_name_edit_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:background="@null"
|
||||
android:hint="请输入你的职业"
|
||||
android:text=""
|
||||
android:textSize="14sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginLeft="16dp"/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
81
app/src/main/res/layout/activity_personal_school.xml
Normal file
81
app/src/main/res/layout/activity_personal_school.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?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="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:viewBindingIgnore="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="36dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_finish"
|
||||
android:layout_width="@dimen/dp44"
|
||||
android:layout_height="@dimen/dp44">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp16"
|
||||
android:layout_height="@dimen/dp16"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_return"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_finish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="我的学校"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/shape_button_enable"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_finish"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_finish" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:background="@drawable/shape_f9fafc_bg_r14"
|
||||
android:layout_marginHorizontal="@dimen/dp20">
|
||||
<EditText
|
||||
android:id="@+id/nick_name_edit_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:background="@null"
|
||||
android:hint="请输入你的学校"
|
||||
android:text=""
|
||||
android:textSize="14sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_marginLeft="16dp"/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,45 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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="@color/white"
|
||||
android:orientation="vertical"
|
||||
tools:viewBindingIgnore="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_finish"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="54dp"
|
||||
android:drawableStart="@drawable/ic_return"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="center"
|
||||
android:text="个性签名"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_marginTop="36dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/shape_button_enable"
|
||||
android:gravity="center"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:text="完成"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_finish"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_finish" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_finish"
|
||||
android:layout_width="@dimen/dp44"
|
||||
android:layout_height="@dimen/dp44">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp16"
|
||||
android:layout_height="@dimen/dp16"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_return"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_finish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="个性签名"
|
||||
android:textColor="@color/one_text"
|
||||
android:textSize="18dp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/shape_button_enable"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_gravity="center"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_finish"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_finish" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -62,7 +80,6 @@
|
||||
android:background="@null"
|
||||
android:gravity="top"
|
||||
android:hint="请输入个性签名内容..."
|
||||
android:maxLength="20"
|
||||
android:padding="12dp"
|
||||
android:textColor="@color/one_text"
|
||||
android:textColorHint="@color/three_text"
|
||||
@@ -76,7 +93,8 @@
|
||||
android:gravity="center_vertical|end"
|
||||
android:paddingEnd="12dp"
|
||||
android:text="0/20"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/three_text"
|
||||
android:textSize="12dp" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
73
app/src/main/res/layout/activity_photo_list_two.xml
Normal file
73
app/src/main/res/layout/activity_photo_list_two.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp46"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp14"
|
||||
android:layout_height="@dimen/dp14"
|
||||
android:layout_marginLeft="@dimen/dp20"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_photo_tips"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp12"
|
||||
android:text="重要:请上传本人照片展示自己"
|
||||
android:layout_marginLeft="@dimen/dp10"
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#FF8000"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp12"
|
||||
android:text="请上传 1-9张本人照片"
|
||||
android:layout_marginLeft="@dimen/dp10"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:textColor="#666666"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp10"
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:layout_above="@+id/submit_button"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit_button"
|
||||
style="@style/caiButtonStyleV2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp48"
|
||||
android:layout_marginLeft="48dp"
|
||||
android:layout_marginRight="48dp"
|
||||
android:layout_marginVertical="@dimen/dp20"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:text="上传"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -16,7 +16,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="真实姓名"
|
||||
android:textColor="@color/two_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp15" />
|
||||
|
||||
<EditText
|
||||
@@ -51,7 +51,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="身份证号"
|
||||
android:textColor="@color/two_text"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp15" />
|
||||
|
||||
<EditText
|
||||
@@ -78,14 +78,28 @@
|
||||
android:layout_marginRight="12dp"
|
||||
android:background="@color/bottomCuttingLine" />
|
||||
|
||||
<TextView
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:layout_marginLeft="@dimen/dp12"
|
||||
android:text="身份证明正、反两面照片"
|
||||
android:textColor="@color/two_text"
|
||||
android:textSize="@dimen/sp15" />
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp4"
|
||||
android:layout_height="@dimen/dp6"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/shape_button_enable"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp10"
|
||||
android:text="身份证明正、反两面照片"
|
||||
android:textColor="#333333"
|
||||
android:textSize="@dimen/dp14" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -104,16 +118,18 @@
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iv_card_z"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp100"
|
||||
android:layout_width="@dimen/dp109"
|
||||
android:layout_height="@dimen/dp75"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@mipmap/ic_cover_default"
|
||||
android:background="@drawable/ic_card_zm"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/dp12"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="身份证正面"/>
|
||||
@@ -129,10 +145,11 @@
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iv_card_f"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp100"
|
||||
android:layout_width="@dimen/dp109"
|
||||
android:layout_height="@dimen/dp75"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@mipmap/ic_cover_default"
|
||||
android:background="@drawable/ic_card_fm"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@@ -140,6 +157,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:textSize="@dimen/dp12"
|
||||
android:text="身份证反面"/>
|
||||
</LinearLayout>
|
||||
@@ -155,14 +173,28 @@
|
||||
android:layout_marginRight="12dp"
|
||||
android:background="@color/bottomCuttingLine" />
|
||||
|
||||
<TextView
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:layout_marginLeft="@dimen/dp12"
|
||||
android:text="手持身份证明正面照片"
|
||||
android:textColor="@color/two_text"
|
||||
android:textSize="@dimen/sp15" />
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp4"
|
||||
android:layout_height="@dimen/dp6"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/shape_button_enable"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp10"
|
||||
android:text="手持身份证明正面照片"
|
||||
android:textColor="#333333"
|
||||
android:textSize="@dimen/dp14" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -181,10 +213,11 @@
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iv_shou_z"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp100"
|
||||
android:layout_width="@dimen/dp109"
|
||||
android:layout_height="@dimen/dp75"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY"
|
||||
android:background="@mipmap/ic_cover_default"
|
||||
android:background="@drawable/ic_card_sc"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@@ -192,6 +225,7 @@
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/dp12"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:gravity="center"
|
||||
android:text="手持身份证正面"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -19,6 +19,51 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="资料完成度"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/dp14"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_finish_bfb"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp4"
|
||||
android:text="30%"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/dp14"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar_bfb"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginHorizontal="@dimen/dp16"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:progressDrawable="@drawable/custom_progress"
|
||||
android:layout_marginBottom="@dimen/dp15"
|
||||
android:progress="50"
|
||||
android:max="100"
|
||||
android:layout_height="@dimen/dp7"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -88,6 +133,7 @@
|
||||
android:id="@+id/videoBtn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="79dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginHorizontal="@dimen/dp16"
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:background="@drawable/shape_white_bg_r14">
|
||||
@@ -185,6 +231,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/settings_info_edit_photos"
|
||||
android:layout_marginTop="4dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginHorizontal="@dimen/dp16"
|
||||
android:background="@android:color/white"
|
||||
android:text="长按拖拽更改顺序,上传图片需审核通过后才能更新展示"
|
||||
@@ -197,16 +244,44 @@
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="@dimen/dp12"
|
||||
android:layout_marginRight="16dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/photosBtn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_white_bg_r14">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:src="@drawable/group"
|
||||
android:tint="@color/black" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/photosImageView"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginVertical="@dimen/dp15"
|
||||
app:roundAsCircle="true"
|
||||
android:layout_marginLeft="@dimen/dp15"
|
||||
android:layout_marginRight="44dp"
|
||||
app:roundedCornerRadius="4dp" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="基本资料"
|
||||
android:layout_marginLeft="@dimen/dp16"
|
||||
android:layout_marginTop="@dimen/dp16"
|
||||
android:text="基础资料"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp" />
|
||||
@@ -257,6 +332,32 @@
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_gender_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="性别"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_info_edit_gender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:drawablePadding="10dp"
|
||||
android:textColor="#666666"
|
||||
android:layout_marginRight="@dimen/dp15"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_birthday_layout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -278,6 +379,9 @@
|
||||
android:layout_toLeftOf="@+id/iv_birthday_right"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:gravity="right"
|
||||
android:hint="请选择生日"
|
||||
android:textColorHint="#E472ED"
|
||||
android:textColor="#666666"
|
||||
android:textSize="16sp" />
|
||||
|
||||
@@ -292,9 +396,8 @@
|
||||
android:src="@drawable/group" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_job_layout"
|
||||
android:id="@+id/settings_info_edit_age_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp">
|
||||
|
||||
@@ -303,22 +406,78 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="职业"
|
||||
android:text="年龄"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_info_edit_job"
|
||||
android:id="@+id/settings_info_edit_age"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_toLeftOf="@+id/iv_job_right"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#666666"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_xz_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="星座"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_info_edit_xz"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#666666"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_height_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="身高"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_info_edit_height"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_toLeftOf="@+id/iv_height_right"
|
||||
android:textColor="#666666"
|
||||
android:hint="请选择身高"
|
||||
android:gravity="right"
|
||||
android:textColorHint="#E472ED"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_job_right"
|
||||
android:id="@+id/iv_height_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
@@ -332,6 +491,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_city_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="54dp">
|
||||
|
||||
<TextView
|
||||
@@ -367,6 +527,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_ip_city_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="54dp">
|
||||
|
||||
<TextView
|
||||
@@ -392,6 +553,108 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp16"
|
||||
android:layout_marginTop="@dimen/dp16"
|
||||
android:text="更多资料"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:layout_marginHorizontal="@dimen/dp16"
|
||||
android:background="@drawable/shape_white_bg_r14"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_xx_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_xx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="学校"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_info_edit_school"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp10"
|
||||
android:layout_toRightOf="@+id/tv_xx"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_toLeftOf="@+id/iv_xx_right"
|
||||
android:textColor="#666666"
|
||||
android:hint="我的学校是?"
|
||||
android:gravity="right"
|
||||
android:textColorHint="#E472ED"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_xx_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:tint="@color/black"
|
||||
android:src="@drawable/group" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_info_edit_job_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_zy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="职业"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_info_edit_job"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_toLeftOf="@+id/iv_job_right"
|
||||
android:layout_toRightOf="@+id/tv_zy"
|
||||
android:layout_marginLeft="@dimen/dp10"
|
||||
android:textColor="#666666"
|
||||
android:hint="我的职业是?"
|
||||
android:gravity="right"
|
||||
android:textColorHint="#E472ED"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_job_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:tint="@color/black"
|
||||
android:src="@drawable/group" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/settings_info_edit_sign_layout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -403,7 +666,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginLeft="@dimen/dp16"
|
||||
android:text="个性签名"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
@@ -428,7 +691,7 @@
|
||||
android:id="@+id/settings_info_edit_sign"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="设置一条个性签名吧"
|
||||
android:hint="你很酷,介绍一下自己~"
|
||||
android:layout_toLeftOf="@+id/iv_edit_sign_right"
|
||||
android:layout_marginRight="@dimen/dp10"
|
||||
android:padding="@dimen/dp12"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
app:roundedCornerRadius="@dimen/dp5"
|
||||
android:layout_marginTop="@dimen/dp15"
|
||||
android:layout_width="@dimen/dp120"
|
||||
android:background="@mipmap/ic_cover_default"
|
||||
android:background="@drawable/ic_photo_empty"
|
||||
android:layout_height="@dimen/dp120"/>
|
||||
|
||||
<View
|
||||
|
||||
@@ -6,18 +6,31 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginTop="@dimen/dp20"
|
||||
android:background="@drawable/shape_f9fafc_bg_r14"
|
||||
android:layout_marginHorizontal="@dimen/dp20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wx_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="微信号"
|
||||
android:textColor="@color/black"
|
||||
android:gravity="center"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="@dimen/dp15"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<EditText
|
||||
android:maxLength="10"
|
||||
android:id="@+id/nick_name_edit_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@null"
|
||||
android:layout_toRightOf="@+id/tv_wx_title"
|
||||
android:hint="输入你的微信号"
|
||||
android:text=""
|
||||
android:textSize="14sp"
|
||||
@@ -25,6 +38,13 @@
|
||||
android:layout_marginLeft="16dp"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="@dimen/dp5"
|
||||
android:layout_marginHorizontal="@dimen/dp20"
|
||||
android:background="#EEEEEE"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/nick_name_edit_button_confirm"
|
||||
android:layout_width="295dp"
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
android:gravity="center">
|
||||
<ImageView
|
||||
android:id="@+id/info_edit_photo_selector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_news_with3"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ic_photo_empty"/>
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/info_edit_photo_delete"
|
||||
|
||||
Reference in New Issue
Block a user