升级窗口,更换H5链接
This commit is contained in:
@@ -111,7 +111,7 @@ public class UIHelper {
|
||||
|
||||
//侧边栏===>帮助
|
||||
public static void showUsinghelp(Context mContext) {
|
||||
CommonWebViewActivity.start(mContext, UriProvider.IM_SERVER_URL + "/modules/guide/guide.html");
|
||||
CommonWebViewActivity.start(mContext, UriProvider.getHelp());
|
||||
}
|
||||
|
||||
|
||||
|
@@ -43,8 +43,8 @@ public class HomePlayAdapter extends BaseQuickAdapter<HomePlayInfo, BaseViewHold
|
||||
return;
|
||||
}
|
||||
//tag
|
||||
helper.setVisible(R.id.iv_tag,!TextUtils.isEmptyText(item.getRoomTag()));
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_tag), item.getRoomTag());
|
||||
helper.setVisible(R.id.iv_tag,!TextUtils.isEmptyText(item.getTagPict()));
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_tag), item.getTagPict());
|
||||
|
||||
helper.setText(R.id.tv_online_num,item.getOnlineNum()+"")
|
||||
.setText(R.id.tv_title,item.getTitle());
|
||||
|
@@ -4,6 +4,7 @@ import androidx.annotation.NonNull;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.yizhuan.xchat_android_library.utils.StringUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.net.MobileNumberUtils;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -13,6 +14,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class AccountValidator {
|
||||
|
||||
|
||||
/**
|
||||
* 正则:手机号(精确)
|
||||
* <p>移动:134(0-8)、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188、198</p>
|
||||
@@ -49,21 +51,17 @@ public class AccountValidator {
|
||||
|
||||
public boolean isValid(@NonNull CharSequence text) {
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
// char c = text.charAt(0);
|
||||
// if (!(c == '1')) {
|
||||
// errorStr = "手机号码错误";
|
||||
// return false;
|
||||
// }
|
||||
// if (text.length() > 11) {
|
||||
// errorStr = "账号长度为11个字符";
|
||||
// return false;
|
||||
// }
|
||||
// if(!MobileNumberUtils.isChinaInternalNumber(text) && !MobileNumberUtils.isChinaMobileNumber(text) && !MobileNumberUtils.isChinaTelecomNumber(text) && !MobileNumberUtils.isChinaUnicomNumber(text)){
|
||||
// errorStr = "请填写正确的手机号码";
|
||||
// return false;
|
||||
// }
|
||||
char c = text.charAt(0);
|
||||
if (!(c == '1')) {
|
||||
errorMessage = "手机号码错误";
|
||||
return false;
|
||||
}
|
||||
if(!MobileNumberUtils.isChinaInternalNumber(text) && !MobileNumberUtils.isChinaMobileNumber(text) && !MobileNumberUtils.isChinaTelecomNumber(text) && !MobileNumberUtils.isChinaUnicomNumber(text)){
|
||||
errorMessage = "请填写正确的手机号码";
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
errorMessage = "账号不能为空!";
|
||||
errorMessage = "手机号不能为空!";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@@ -16,6 +16,7 @@ import android.widget.EditText;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseActivity;
|
||||
import com.yizhuan.xchat_android_core.auth.event.LoginEvent;
|
||||
import com.yizhuan.xchat_android_library.utils.NetworkUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -98,6 +99,10 @@ public class LoginPhoneActivity extends BaseActivity implements View.OnClickList
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_next:
|
||||
if (!NetworkUtils.isNetworkStrictlyAvailable(this)) {
|
||||
checkNetToast();
|
||||
return;
|
||||
}
|
||||
if (!accountValidator.isValid(accountEt.getText().toString())) {
|
||||
toast(accountValidator.getErrorMessage());
|
||||
return;
|
||||
@@ -149,4 +154,6 @@ public class LoginPhoneActivity extends BaseActivity implements View.OnClickList
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -345,7 +345,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
*/
|
||||
private void initDynamicList(List<WorldDynamicBean> list) {
|
||||
mBinding.rvDynamic.setLayoutManager(new LinearLayoutManager(this));
|
||||
UserInfoDynamicAdapter dynamicAdapter= new UserInfoDynamicAdapter(this);
|
||||
UserInfoDynamicAdapter dynamicAdapter= new UserInfoDynamicAdapter(this,identityState);
|
||||
dynamicAdapter.setNewData(list);
|
||||
dynamicAdapter.setEnableLoadMore(false);
|
||||
mBinding.rvDynamic.setAdapter(dynamicAdapter);
|
||||
|
@@ -76,9 +76,15 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
*/
|
||||
private int divider;
|
||||
|
||||
public UserInfoDynamicAdapter(Context context) {
|
||||
/**
|
||||
* 身份是客态还是主态
|
||||
*/
|
||||
private int mIdentityState;
|
||||
|
||||
public UserInfoDynamicAdapter(Context context,int identityState) {
|
||||
super(R.layout.item_userinfo_dynamic);
|
||||
this.context = context;
|
||||
this.mIdentityState = identityState;
|
||||
iconWidth = UIUtil.dip2px(context, 32);
|
||||
iconHeight = UIUtil.dip2px(context, 15);
|
||||
imageTmHasText = UIUtil.dip2px(context, 15f);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#fefefe" />
|
||||
<corners android:radius="8.5dp" />
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
@@ -83,6 +83,7 @@
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
>
|
||||
|
||||
|
||||
|
@@ -33,7 +33,7 @@ public class AppUpdateDialog extends DialogFragment implements View.OnClickListe
|
||||
private static final String TAG = "ErbanUpdateDialog";
|
||||
|
||||
private ImageView close;
|
||||
private ImageView confirmButton;
|
||||
private TextView confirmButton;
|
||||
private TextView contentView;
|
||||
private NewestVersionInfo newestVersionInfo;
|
||||
private ProgressBar progressBar;
|
||||
|
@@ -25,6 +25,7 @@ public class AppUpgradeHelper {
|
||||
@SuppressLint("CheckResult")
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity, boolean isUserAuto,
|
||||
boolean isPush) {
|
||||
|
||||
if (isPush) {
|
||||
//如果是后台推送,统一拦截
|
||||
} else {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 11 KiB |
@@ -2,7 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="280dp"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:background="@color/black">
|
||||
@@ -17,8 +17,8 @@
|
||||
<View
|
||||
android:id="@+id/view_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="402dp"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_height="385dp"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@drawable/dialog_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -27,84 +27,78 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close_image"
|
||||
android:layout_width="@dimen/dp_25"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/common_ic_close_black"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:src="@drawable/icon_pm_close"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_background"
|
||||
app:layout_constraintTop_toTopOf="@id/view_background" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_update_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/dialog_update_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_background"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_update_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_17"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:text="@string/title_upgrade_app"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_update_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_update_icon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_update_icon"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_update_title_en"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:text="@string/title_upgrade_app_en"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/dp_13"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_update_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_update_title"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/sv_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="192dp"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:fadeScrollbars="true"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_background"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_background"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_update_icon">
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_update_title">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_update_dialog_content"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/color_666666"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_13"
|
||||
tools:text="1.youhua\n2.shouye\n3.buju" />
|
||||
</ScrollView>
|
||||
|
||||
<ImageView
|
||||
<TextView
|
||||
android:id="@+id/iv_update_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_29"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/dialog_update_button"
|
||||
android:background="@drawable/bg_common_confirm_normal_22r"
|
||||
android:text="立即更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_background"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_background"
|
||||
tools:ignore="ContentDescription"
|
||||
android:gravity="center"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
|
@@ -103,17 +103,26 @@ public class UriProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* 等级界面
|
||||
* 帮助页
|
||||
*/
|
||||
public static String getUserLevelUrl() {
|
||||
return JAVA_WEB_URL.concat("/modules/level/my-level.html?type=user");
|
||||
public static String getHelp() {
|
||||
return IM_SERVER_URL.concat("/accompany/modules/rank/index.html#/wishingWellHelp");
|
||||
}
|
||||
|
||||
/**
|
||||
* 等级界面
|
||||
*/
|
||||
public static String getUserLevelUrl() {
|
||||
return JAVA_WEB_URL.concat("/accompany/modules/level/index.html");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 等级界面
|
||||
*/
|
||||
public static String getUserCharmLevelUrl() {
|
||||
return JAVA_WEB_URL.concat("/modules/level/my-level.html?type=charm");
|
||||
return JAVA_WEB_URL.concat("/accompany/modules/charm/index.html");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -88,8 +88,6 @@ public class UserInfo implements Serializable {
|
||||
/**
|
||||
* 等级信息
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
private UserLevelVo userLevelVo;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user