From 1fc37eb85dcb205cac05a1599db67a64a24be2de Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 25 Nov 2023 13:34:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=8C=E6=88=90=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5UI=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/chwl/app/home/MeViewModel.kt | 3 +- .../com/chwl/app/ui/im/RouterHandler.java | 3 + .../com/chwl/app/ui/login/LoginActivity.java | 4 +- .../ui/user/activity/UserInfoActivity.java | 173 ++-- .../drawable-xhdpi/icon_home_page_more.webp | Bin 182 -> 0 bytes .../icon_home_page_more_black.webp | Bin 206 -> 0 bytes .../main/res/drawable/user_info_bg_audio.xml | 6 + .../main/res/drawable/user_info_bg_follow.xml | 8 + .../main/res/drawable/user_info_bg_live.xml | 9 + .../res/drawable/user_info_bg_top_cover.xml | 10 + .../drawable/user_info_ic_audio_palying.xml | 36 + .../res/drawable/user_info_ic_audio_pause.xml | 25 + .../res/drawable/user_info_ic_audio_play.xml | 19 + .../main/res/drawable/user_info_ic_edit.xml | 12 + .../res/drawable/user_info_ic_edit_black.xml | 12 + .../main/res/drawable/user_info_ic_live.xml | 12 + .../main/res/drawable/user_info_ic_more.xml | 12 + .../res/drawable/user_info_ic_more_black.xml | 12 + .../main/res/layout/activity_user_info.xml | 743 ++++++++---------- app/src/main/res/layout/fragment_me.xml | 1 + .../layout/fragment_userinfo_gift_wall.xml | 1 + .../res/layout/fragment_userinfo_userinfo.xml | 3 +- .../res/layout/user_info_bottom_layout.xml | 27 +- .../chwl/core/im/custom/bean/RouterType.java | 4 + .../res/drawable/base_shape_cbff00_23dp.xml | 6 + .../res/drawable/base_shape_ffee00_23dp.xml | 6 + .../res/drawable/base_shape_fffdaa_23dp.xml | 6 + 27 files changed, 626 insertions(+), 527 deletions(-) delete mode 100644 app/src/main/res/drawable-xhdpi/icon_home_page_more.webp delete mode 100644 app/src/main/res/drawable-xhdpi/icon_home_page_more_black.webp create mode 100644 app/src/main/res/drawable/user_info_bg_audio.xml create mode 100644 app/src/main/res/drawable/user_info_bg_follow.xml create mode 100644 app/src/main/res/drawable/user_info_bg_live.xml create mode 100644 app/src/main/res/drawable/user_info_bg_top_cover.xml create mode 100644 app/src/main/res/drawable/user_info_ic_audio_palying.xml create mode 100644 app/src/main/res/drawable/user_info_ic_audio_pause.xml create mode 100644 app/src/main/res/drawable/user_info_ic_audio_play.xml create mode 100644 app/src/main/res/drawable/user_info_ic_edit.xml create mode 100644 app/src/main/res/drawable/user_info_ic_edit_black.xml create mode 100644 app/src/main/res/drawable/user_info_ic_live.xml create mode 100644 app/src/main/res/drawable/user_info_ic_more.xml create mode 100644 app/src/main/res/drawable/user_info_ic_more_black.xml create mode 100644 modules/module_base/src/main/res/drawable/base_shape_cbff00_23dp.xml create mode 100644 modules/module_base/src/main/res/drawable/base_shape_ffee00_23dp.xml create mode 100644 modules/module_base/src/main/res/drawable/base_shape_fffdaa_23dp.xml diff --git a/app/src/main/java/com/chwl/app/home/MeViewModel.kt b/app/src/main/java/com/chwl/app/home/MeViewModel.kt index b4e21d8be..e7825f70f 100644 --- a/app/src/main/java/com/chwl/app/home/MeViewModel.kt +++ b/app/src/main/java/com/chwl/app/home/MeViewModel.kt @@ -74,7 +74,8 @@ class MeViewModel : BaseViewModel() { add( MeCenterInfo( icon = R.drawable.me_ic_menu_level, - centerName = "我的等級" + centerName = "我的等級", + skipType = RouterType.USER_LEVEL ) ) add( diff --git a/app/src/main/java/com/chwl/app/ui/im/RouterHandler.java b/app/src/main/java/com/chwl/app/ui/im/RouterHandler.java index 3e864ae6d..9d3d453ce 100644 --- a/app/src/main/java/com/chwl/app/ui/im/RouterHandler.java +++ b/app/src/main/java/com/chwl/app/ui/im/RouterHandler.java @@ -333,6 +333,9 @@ public class RouterHandler { case RouterType.MY_REVENUE: EarnRecordActivity.start(context); break; + case RouterType.USER_LEVEL: + CommonWebViewActivity.start(context, UriProvider.getUserLevelUrl()); + break; default: SingleToastUtil.showToast(ResUtil.getString(R.string.ui_im_routerhandler_07)); return false; diff --git a/app/src/main/java/com/chwl/app/ui/login/LoginActivity.java b/app/src/main/java/com/chwl/app/ui/login/LoginActivity.java index f89fbcb28..61774e4b4 100644 --- a/app/src/main/java/com/chwl/app/ui/login/LoginActivity.java +++ b/app/src/main/java/com/chwl/app/ui/login/LoginActivity.java @@ -92,7 +92,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener private void onSetListener() { findViewById(R.id.cs_google).setOnClickListener(this); - findViewById(R.id.tv_others).setOnClickListener(this); + findViewById(R.id.layout_other).setOnClickListener(this); } protected void setProtocol() { @@ -199,7 +199,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener }); break; - case R.id.tv_others: + case R.id.layout_other: reportLoginType(IReportConstants.FIVE); LoginPasswordActivity.start(LoginActivity.this); break; diff --git a/app/src/main/java/com/chwl/app/ui/user/activity/UserInfoActivity.java b/app/src/main/java/com/chwl/app/ui/user/activity/UserInfoActivity.java index bf8c447f2..9cd00f3ed 100644 --- a/app/src/main/java/com/chwl/app/ui/user/activity/UserInfoActivity.java +++ b/app/src/main/java/com/chwl/app/ui/user/activity/UserInfoActivity.java @@ -19,8 +19,6 @@ import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProvider; import androidx.viewpager.widget.ViewPager; -import com.google.android.flexbox.AlignItems; -import com.google.android.flexbox.FlexDirection; import com.netease.nim.uikit.StatusBarUtil; import com.netease.nim.uikit.impl.cache.NimUserInfoCache; import com.netease.nimlib.sdk.RequestCallbackWrapper; @@ -46,11 +44,9 @@ import com.chwl.app.ui.im.avtivity.NimFriendModel; import com.chwl.app.ui.im.avtivity.NimP2PMessageActivity; import com.chwl.app.ui.user.adapter.SelfPhotoAdapter; import com.chwl.app.ui.user.adapter.UserInfoIndicatorAdapter; -import com.chwl.app.ui.user.adapter.UserInfoLabelAdapter; import com.chwl.app.ui.user.adapter.UserInfoPagerAdapter; import com.chwl.app.ui.user.adapter.UserInfoPhotoAdapter; import com.chwl.app.ui.user.adapter.UserPhotoAdapter; -import com.chwl.app.ui.user.dialog.UserLabelDialog; import com.chwl.app.ui.user.fragment.UserInfoGiftWallFragment; import com.chwl.app.ui.user.fragment.UserInfoInfoFragment; import com.chwl.app.ui.user.viewmodel.UserInfoViewModel; @@ -60,11 +56,8 @@ import com.chwl.app.ui.widget.ButtonItem; import com.chwl.app.ui.widget.ObservableScrollView; import com.chwl.app.ui.widget.magicindicator.ViewPagerHelper; import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator; -import com.chwl.app.ui.widget.rollviewpager.HintView; -import com.chwl.app.ui.widget.rollviewpager.RollPagerView; import com.chwl.app.ui.widget.rollviewpager.adapter.StaticPagerAdapterWrapper; import com.chwl.app.utils.RegexUtil; -import com.chwl.app.vip.util.VipHelper; import com.chwl.core.XConstants; import com.chwl.core.Constants; import com.chwl.core.auth.AuthModel; @@ -85,9 +78,7 @@ import com.chwl.core.user.event.LoginUserInfoUpdateEvent; import com.chwl.core.utils.LogUtils; import com.chwl.core.utils.Logger; import com.chwl.library.annatation.ActLayoutRes; -import com.chwl.library.common.widget.LinesFlexBoxLayoutManager; import com.chwl.library.utils.ListUtils; -import com.chwl.library.utils.ResUtil; import com.chwl.library.utils.SingleToastUtil; import com.chwl.library.utils.SizeUtils; @@ -141,7 +132,7 @@ public class UserInfoActivity extends BaseBindingActivity { mBinding.viewPager.setCurrentItem(position); @@ -322,11 +313,11 @@ public class UserInfoActivity extends BaseBindingActivity { copyName(); @@ -348,39 +339,39 @@ public class UserInfoActivity extends BaseBindingActivity labels) { - if (labels == null || labels.isEmpty()) { - if (AuthModel.get().getCurrentUid() != userId) { - mBinding.groupLabel.setVisibility(View.GONE); - mBinding.tvEditLabel.setVisibility(View.GONE); - } else { - mBinding.groupLabel.setVisibility(View.GONE); - mBinding.tvEditLabel.setVisibility(View.VISIBLE); - mBinding.tvEditLabel.setOnClickListener(view -> { - EditUserLabelActivity.start(this); - }); - } - return; - } else { - mBinding.groupLabel.setVisibility(View.VISIBLE); - mBinding.tvEditLabel.setVisibility(View.GONE); - } - UserInfoLabelAdapter userInfoLabelAdapter = new UserInfoLabelAdapter(); - - LinesFlexBoxLayoutManager labelLayoutManager = new LinesFlexBoxLayoutManager(this); - labelLayoutManager.setFlexDirection(FlexDirection.ROW); - labelLayoutManager.setAlignItems(AlignItems.FLEX_START); - labelLayoutManager.setMaxLines(1); - mBinding.mLabelRecyclerView.setLayoutManager(labelLayoutManager); - mBinding.mLabelRecyclerView.setAdapter(userInfoLabelAdapter); - - userInfoLabelAdapter.setNewData(labels); - } +// /** +// * 标签 +// * +// * @param labels +// */ +// private void initLabel(List labels) { +// if (labels == null || labels.isEmpty()) { +// if (AuthModel.get().getCurrentUid() != userId) { +// mBinding.groupLabel.setVisibility(View.GONE); +// mBinding.tvEditLabel.setVisibility(View.GONE); +// } else { +// mBinding.groupLabel.setVisibility(View.GONE); +// mBinding.tvEditLabel.setVisibility(View.VISIBLE); +// mBinding.tvEditLabel.setOnClickListener(view -> { +// EditUserLabelActivity.start(this); +// }); +// } +// return; +// } else { +// mBinding.groupLabel.setVisibility(View.VISIBLE); +// mBinding.tvEditLabel.setVisibility(View.GONE); +// } +// UserInfoLabelAdapter userInfoLabelAdapter = new UserInfoLabelAdapter(); +// +// LinesFlexBoxLayoutManager labelLayoutManager = new LinesFlexBoxLayoutManager(this); +// labelLayoutManager.setFlexDirection(FlexDirection.ROW); +// labelLayoutManager.setAlignItems(AlignItems.FLEX_START); +// labelLayoutManager.setMaxLines(1); +// mBinding.mLabelRecyclerView.setLayoutManager(labelLayoutManager); +// mBinding.mLabelRecyclerView.setAdapter(userInfoLabelAdapter); +// +// userInfoLabelAdapter.setNewData(labels); +// } /** * 相册 @@ -390,20 +381,20 @@ public class UserInfoActivity extends BaseBindingActivity { - // 点击跳转到声音签名页面 - UIHelper.showSoundAct( - this, - UserInfoModifyActivity.Method.AUDIO, - ResUtil.getString(R.string.ui_user_userinfomodifyactivity_07), - audioCard); - }); +// mBinding.llAudioTip.setOnClickListener(view -> { +// // 点击跳转到声音签名页面 +// UIHelper.showSoundAct( +// this, +// UserInfoModifyActivity.Method.AUDIO, +// ResUtil.getString(R.string.ui_user_userinfomodifyactivity_07), +// audioCard); +// }); } private void showSoundCard(UserInfo.SoundBean audioCard) { mBinding.llAudio.setVisibility(View.VISIBLE); - mBinding.llAudioTip.setVisibility(View.GONE); - mBinding.tvAudio.setText(String.valueOf(audioCard.getSecond())); +// mBinding.llAudioTip.setVisibility(View.GONE); + mBinding.tvAudio.setText(audioCard.getSecond() + "s"); mBinding.livUser.stopAnimation(); mBinding.llAudio.setOnClickListener(v -> toggleAudio(audioCard)); } @@ -695,7 +692,7 @@ public class UserInfoActivity extends BaseBindingActivityJ$(bU=hIuWD5YXJ{URr1bD;&d5rD}(+)ay!0*png|56&Q&`)w`k1HKi516Q zY8hT;aS2KKx9XUqn8(Uv4=)7;7|&|hBC>A29ME0`Eubw1%nWlGwG0>x80;o`%=ccp eL}}sT4u%avoS6&^(v5rV_!t=e{qO}UWB>r>#zS)e diff --git a/app/src/main/res/drawable-xhdpi/icon_home_page_more_black.webp b/app/src/main/res/drawable-xhdpi/icon_home_page_more_black.webp deleted file mode 100644 index c9c8632adfefae7eb10f2b0d55818593cf8fc969..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206 zcmWIYbaOk#z`zjh>J$(bU=hIuWD5YXJ{URr1bD;&d5rD}(+)ay!0*png|56&Q&`)w`k1HKi516Q zY8hT;aS2KKx9XUqn8(Uv4=)7;7|&|hBC>A29ME0`C!j4Km>K3WY8fyXFxXABnc<`2f%a E0EE(2J^%m! diff --git a/app/src/main/res/drawable/user_info_bg_audio.xml b/app/src/main/res/drawable/user_info_bg_audio.xml new file mode 100644 index 000000000..e33c38898 --- /dev/null +++ b/app/src/main/res/drawable/user_info_bg_audio.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/user_info_bg_follow.xml b/app/src/main/res/drawable/user_info_bg_follow.xml new file mode 100644 index 000000000..b3cb413d8 --- /dev/null +++ b/app/src/main/res/drawable/user_info_bg_follow.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/user_info_bg_live.xml b/app/src/main/res/drawable/user_info_bg_live.xml new file mode 100644 index 000000000..000698382 --- /dev/null +++ b/app/src/main/res/drawable/user_info_bg_live.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/user_info_bg_top_cover.xml b/app/src/main/res/drawable/user_info_bg_top_cover.xml new file mode 100644 index 000000000..2ea8a6b71 --- /dev/null +++ b/app/src/main/res/drawable/user_info_bg_top_cover.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/user_info_ic_audio_palying.xml b/app/src/main/res/drawable/user_info_ic_audio_palying.xml new file mode 100644 index 000000000..12a62be4c --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_audio_palying.xml @@ -0,0 +1,36 @@ + + + + + + + diff --git a/app/src/main/res/drawable/user_info_ic_audio_pause.xml b/app/src/main/res/drawable/user_info_ic_audio_pause.xml new file mode 100644 index 000000000..246852128 --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_audio_pause.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/app/src/main/res/drawable/user_info_ic_audio_play.xml b/app/src/main/res/drawable/user_info_ic_audio_play.xml new file mode 100644 index 000000000..b9881b2fd --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_audio_play.xml @@ -0,0 +1,19 @@ + + + + diff --git a/app/src/main/res/drawable/user_info_ic_edit.xml b/app/src/main/res/drawable/user_info_ic_edit.xml new file mode 100644 index 000000000..c8d7933bd --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_edit.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/drawable/user_info_ic_edit_black.xml b/app/src/main/res/drawable/user_info_ic_edit_black.xml new file mode 100644 index 000000000..e7f45fd07 --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_edit_black.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/drawable/user_info_ic_live.xml b/app/src/main/res/drawable/user_info_ic_live.xml new file mode 100644 index 000000000..e53bbece7 --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_live.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/drawable/user_info_ic_more.xml b/app/src/main/res/drawable/user_info_ic_more.xml new file mode 100644 index 000000000..7e1614735 --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_more.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/drawable/user_info_ic_more_black.xml b/app/src/main/res/drawable/user_info_ic_more_black.xml new file mode 100644 index 000000000..b073058d9 --- /dev/null +++ b/app/src/main/res/drawable/user_info_ic_more_black.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/layout/activity_user_info.xml b/app/src/main/res/layout/activity_user_info.xml index 0270c37ef..2c356c9c9 100644 --- a/app/src/main/res/layout/activity_user_info.xml +++ b/app/src/main/res/layout/activity_user_info.xml @@ -2,16 +2,10 @@ - - - - - - + android:background="@color/color_FFFFFF"> - + android:paddingBottom="@dimen/dp_20"> - + android:layout_height="@dimen/dp_190" + app:layout_constraintTop_toTopOf="parent" + app:rollviewpager_play_delay="5000" /> - + - - + - + + + + + android:textSize="@dimen/sp_13" + tools:text="60S" /> - + - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="0dp" + android:layout_marginTop="@dimen/dp_180" + android:background="@drawable/shape_white_top_12dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - + - - - + + app:clearsAfterDetached="true" /> + android:textColor="@color/color_1E1E1F" + android:textSize="@dimen/sp_11" /> - + - + + + + + + android:textColor="@color/color_84868A" + android:textSize="@dimen/sp_12" + tools:text="ID:7958626" /> - + + + android:src="@mipmap/ic_good_num" + android:visibility="gone" + tools:visibility="visible" /> + + + android:layout_marginEnd="@dimen/dp_16" + android:baselineAligned="true" + android:orientation="horizontal"> + tools:text="19" /> - - - - - - - - - - - - - + android:layout_marginStart="@dimen/dp_3" + android:text="@string/fan" + android:textColor="@color/color_84868A" + android:textSize="@dimen/sp_12" /> - + - + - - - - - - - - - - - - - - - - - - + + android:layout_height="@dimen/dp_20" + android:layout_marginEnd="@dimen/dp_4" + android:adjustViewBounds="true" + android:visibility="visible" + tools:src="@mipmap/ic_user_level" /> - + + + + + + + + + + + tools:visibility="visible" /> + - + + + + + + + + + - + + + + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + android:layout_height="@dimen/dp_44"> + android:layout_marginEnd="@dimen/dp_7" + android:scaleType="centerInside" + android:src="@drawable/user_info_ic_more" /> @@ -545,31 +451,24 @@ - - - - + + @@ -577,7 +476,7 @@ diff --git a/app/src/main/res/layout/fragment_me.xml b/app/src/main/res/layout/fragment_me.xml index 0cf186dae..75961cb7f 100644 --- a/app/src/main/res/layout/fragment_me.xml +++ b/app/src/main/res/layout/fragment_me.xml @@ -153,6 +153,7 @@ android:id="@+id/iv_copy" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/dp_4" android:src="@drawable/ic_user_info_copy" /> diff --git a/app/src/main/res/layout/fragment_userinfo_gift_wall.xml b/app/src/main/res/layout/fragment_userinfo_gift_wall.xml index e56f34d25..f59ed577c 100644 --- a/app/src/main/res/layout/fragment_userinfo_gift_wall.xml +++ b/app/src/main/res/layout/fragment_userinfo_gift_wall.xml @@ -5,6 +5,7 @@ android:layout_height="match_parent"> diff --git a/app/src/main/res/layout/fragment_userinfo_userinfo.xml b/app/src/main/res/layout/fragment_userinfo_userinfo.xml index 694f129e1..7bb062029 100644 --- a/app/src/main/res/layout/fragment_userinfo_userinfo.xml +++ b/app/src/main/res/layout/fragment_userinfo_userinfo.xml @@ -3,7 +3,8 @@ 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:layout_height="match_parent" + android:layout_marginHorizontal="@dimen/dp_15"> \ No newline at end of file diff --git a/core/src/main/java/com/chwl/core/im/custom/bean/RouterType.java b/core/src/main/java/com/chwl/core/im/custom/bean/RouterType.java index 7458f307f..f4318bdbf 100644 --- a/core/src/main/java/com/chwl/core/im/custom/bean/RouterType.java +++ b/core/src/main/java/com/chwl/core/im/custom/bean/RouterType.java @@ -278,4 +278,8 @@ public class RouterType { * 收益记录(目前只是本地用到,所以用了100000) */ public static final int MY_REVENUE = 100000; + /** + * 用户等级(目前只是本地用到,所以用了100001) + */ + public static final int USER_LEVEL = 100001; } diff --git a/modules/module_base/src/main/res/drawable/base_shape_cbff00_23dp.xml b/modules/module_base/src/main/res/drawable/base_shape_cbff00_23dp.xml new file mode 100644 index 000000000..d75f7a779 --- /dev/null +++ b/modules/module_base/src/main/res/drawable/base_shape_cbff00_23dp.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/modules/module_base/src/main/res/drawable/base_shape_ffee00_23dp.xml b/modules/module_base/src/main/res/drawable/base_shape_ffee00_23dp.xml new file mode 100644 index 000000000..f109b0436 --- /dev/null +++ b/modules/module_base/src/main/res/drawable/base_shape_ffee00_23dp.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/modules/module_base/src/main/res/drawable/base_shape_fffdaa_23dp.xml b/modules/module_base/src/main/res/drawable/base_shape_fffdaa_23dp.xml new file mode 100644 index 000000000..9d71fde5f --- /dev/null +++ b/modules/module_base/src/main/res/drawable/base_shape_fffdaa_23dp.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file