1:修改趣味展示的时候,出现的换行和里面展示的时候,出现挤压了

2:修改昵称在输入的时候,不能输入空或者制表符等
This commit is contained in:
2026-01-09 16:46:34 +08:00
parent 84fa4ed1f3
commit ca4d9ea20a
4 changed files with 49 additions and 46 deletions

View File

@@ -15,6 +15,8 @@ import com.xscm.moduleutil.utils.SpUtil;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.util.Objects;
/** /**
*@author qx *@author qx
*@data 2025/5/21 *@data 2025/5/21
@@ -33,8 +35,10 @@ public class ChangeNicknameActivity extends BaseMvpActivity<ChangeNicknamePresen
mBinding.topBar.setRightText("保存"); mBinding.topBar.setRightText("保存");
mBinding.topBar.setRightColor(Color.parseColor("#FF8ACC")); mBinding.topBar.setRightColor(Color.parseColor("#FF8ACC"));
mBinding.topBar.getTvRight().setOnClickListener(v -> { mBinding.topBar.getTvRight().setOnClickListener(v -> {
if (!TextUtils.isEmpty(mBinding.edNickName.getText().toString())){ if (!TextUtils.isEmpty(Objects.requireNonNull(mBinding.edNickName.getText()).toString().trim())){
MvpPre.editUserInfo(mBinding.edNickName.getText().toString(),"","","","","",""); MvpPre.editUserInfo(mBinding.edNickName.getText().toString(),"","","","","","");
}else {
ToastUtils.showShort("请输入有效的昵称");
} }
}); });
userInfo= SpUtil.getUserInfo(); userInfo= SpUtil.getUserInfo();

View File

@@ -122,7 +122,7 @@
android:layout_marginTop="@dimen/dp_5" android:layout_marginTop="@dimen/dp_5"
android:drawableLeft="@mipmap/im_zs" android:drawableLeft="@mipmap/im_zs"
android:drawablePadding="@dimen/dp_5" android:drawablePadding="@dimen/dp_5"
android:text="10000" tools:text="10000"
android:textColor="@color/color_FF333333" android:textColor="@color/color_FF333333"
android:textSize="23sp" /> android:textSize="23sp" />
@@ -146,7 +146,7 @@
android:layout_marginTop="@dimen/dp_3" android:layout_marginTop="@dimen/dp_3"
android:paddingBottom="@dimen/dp_3" android:paddingBottom="@dimen/dp_3"
android:drawableLeft="@mipmap/jinb" android:drawableLeft="@mipmap/jinb"
android:text="10000" tools:text="10000"
android:textColor="@color/color_FF333333" android:textColor="@color/color_FF333333"
android:textSize="14sp" /> android:textSize="14sp" />

View File

@@ -1,62 +1,60 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto">
>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_rounded_top_white"> android:background="@drawable/bg_rounded_top_white">
<!-- TabLayout --> <!-- TabLayout -->
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout" android:id="@+id/tab_layout"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_marginTop="16dp" android:layout_marginHorizontal="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_16" android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:tabIndicatorColor="@color/white" app:tabIndicatorColor="@color/white"
app:tabSelectedTextColor="@color/white" app:tabIndicatorHeight="2dp"
app:tabIndicatorHeight="2dp" app:tabMode="scrollable"
app:tabTextColor="#999999" app:tabSelectedTextColor="@color/white"
app:tabTextAppearance="@style/CustomTextAppearanceTab" app:tabTextAppearance="@style/CustomTextAppearanceTab"
/> app:tabTextColor="#999999" />
<!-- 分割线 --> <!-- 分割线 -->
<View <View
android:id="@+id/divider" android:id="@+id/divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="#2C2A38" android:layout_marginStart="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_16" android:layout_marginEnd="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16" android:background="#2C2A38"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_layout"/> app:layout_constraintTop_toBottomOf="@+id/tab_layout" />
<!-- 表情列表 --> <!-- 表情列表 -->
<com.scwang.smartrefresh.layout.SmartRefreshLayout <com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/swipe_refresh_layout" android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="300dp" android:layout_height="300dp"
app:layout_constraintBottom_toBottomOf="parent" android:paddingStart="@dimen/dp_28"
app:layout_constraintEnd_toEndOf="parent" android:paddingEnd="@dimen/dp_28"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider" app:layout_constraintEnd_toEndOf="parent"
android:paddingEnd="@dimen/dp_28" app:layout_constraintStart_toStartOf="parent"
android:paddingStart="@dimen/dp_28" app:layout_constraintTop_toBottomOf="@+id/divider"
app:srlEnableLoadMore="false" app:srlEnableLoadMore="false"
app:srlEnableRefresh="false" app:srlEnableRefresh="false">
>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_emotions" android:id="@+id/rv_emotions"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:overScrollMode="never"/> android:overScrollMode="never" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout> </com.scwang.smartrefresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/dp_60" android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_85" android:layout_height="@dimen/dp_85"
android:layout_marginVertical="@dimen/dp_5"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
> >