From db79bafdbc7f0ab258653200c7f4c9da8e74d2ef Mon Sep 17 00:00:00 2001 From: lzl <1239365383@qq.com> Date: Thu, 20 Nov 2025 16:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E9=97=B4=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xscm/moduleutil/bean/UserInfo.java | 10 +- .../xscm/moduleutil/widget/ShineTextView.kt | 4 +- MainModule/src/main/AndroidManifest.xml | 18 +- .../dialog/RoomGiftDialogFragment.java | 9 +- .../dialog/RoomUserInfoFragment.java | 247 ++++++++++++++---- .../res/layout/fragment_room_user_info.xml | 168 ++++++++---- MainModule/src/main/res/layout/pop_menu.xml | 80 ++---- app/src/main/AndroidManifest.xml | 18 +- gradle.properties | 4 +- 9 files changed, 383 insertions(+), 175 deletions(-) diff --git a/BaseModule/src/main/java/com/xscm/moduleutil/bean/UserInfo.java b/BaseModule/src/main/java/com/xscm/moduleutil/bean/UserInfo.java index 8ac96d5b..4d117868 100644 --- a/BaseModule/src/main/java/com/xscm/moduleutil/bean/UserInfo.java +++ b/BaseModule/src/main/java/com/xscm/moduleutil/bean/UserInfo.java @@ -95,7 +95,7 @@ public class UserInfo extends BaseEvent implements Serializable { "direction": "string", }*/ - public static class CpInfo{ + public static class CpInfo implements Serializable{ public String name; public String level; public String exp; @@ -104,14 +104,14 @@ public class UserInfo extends BaseEvent implements Serializable { public UserInfo1 user_info1; public UserInfo2 user_info2; - public static class UserInfo1{ + public static class UserInfo1 implements Serializable{ public String user_id; public String nickname; public String avatar; public String dress; } - public static class UserInfo2{ + public static class UserInfo2 implements Serializable{ public String user_id; public String nickname; public String avatar; @@ -138,13 +138,13 @@ public class UserInfo extends BaseEvent implements Serializable { // private String tag_name; // } @Data - public static class GiftWall { + public static class GiftWall implements Serializable{ private String gift_name; private String total; private List send_user_info; @Data - public static class SendUserInfo{ + public static class SendUserInfo implements Serializable{ private String nickname; private String avatar; } diff --git a/BaseModule/src/main/java/com/xscm/moduleutil/widget/ShineTextView.kt b/BaseModule/src/main/java/com/xscm/moduleutil/widget/ShineTextView.kt index 7792bc02..eb2223aa 100644 --- a/BaseModule/src/main/java/com/xscm/moduleutil/widget/ShineTextView.kt +++ b/BaseModule/src/main/java/com/xscm/moduleutil/widget/ShineTextView.kt @@ -33,7 +33,7 @@ class ShineTextView : AppCompatTextView { var shineColor: Int = Color.WHITE var endColor: Int = Color.WHITE //一次动效时长 - var shineDuration: Int = 400 + var shineDuration: Int = 1000 var _count: Int = 0 //自行运行动画次数 @@ -77,7 +77,7 @@ class ShineTextView : AppCompatTextView { mLinearGradient = LinearGradient( 0f, 0f, - (mViewWidth / 4).toFloat(), + (mViewWidth / 1).toFloat(), 0f, intArrayOf(currentTextColor, shineColor, currentTextColor), null, diff --git a/MainModule/src/main/AndroidManifest.xml b/MainModule/src/main/AndroidManifest.xml index c3c2bdf7..52f2fb2b 100644 --- a/MainModule/src/main/AndroidManifest.xml +++ b/MainModule/src/main/AndroidManifest.xml @@ -196,15 +196,15 @@ android:enabled="true" android:exported="true" /> - - - + + + + + + + + + \ No newline at end of file diff --git a/MainModule/src/main/java/com/xscm/modulemain/dialog/RoomGiftDialogFragment.java b/MainModule/src/main/java/com/xscm/modulemain/dialog/RoomGiftDialogFragment.java index 06607bc3..033ddab0 100644 --- a/MainModule/src/main/java/com/xscm/modulemain/dialog/RoomGiftDialogFragment.java +++ b/MainModule/src/main/java/com/xscm/modulemain/dialog/RoomGiftDialogFragment.java @@ -117,9 +117,12 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment { //跳转加入公会 - Intent intent=new Intent(getContext(), WebViewActivity.class); - intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_GUILD_URL(),SpUtil.getToken())); + Intent intent = new Intent(getContext(), WebViewActivity.class); + intent.putExtra("url", String.format(WebUrlConstants.INSTANCE.getWEB_GUILD_URL(), SpUtil.getToken())); intent.putExtra("title", "公会"); startActivity(intent); }); updateUIBasedOnTypeAndUser(); dianj(1); + showCp(); + } + + private void showCp() { + if (userInfo.getCp_info() != null) { + mBinding.ll.setVisibility(VISIBLE); + ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.userNav1); + ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.userNav2); + mBinding.tvNickname1.setText(userInfo.getCp_info().user_info1.nickname); + mBinding.tvNickname2.setText(userInfo.getCp_info().user_info2.nickname); + mBinding.tvCpLv.setText("Lv" + userInfo.getCp_info().level + " " + userInfo.getCp_info().name); + mBinding.tvCpNum.setText(userInfo.getCp_info().exp); + + mBinding.cpAnim.setSource(userInfo.getCp_info().pendant, 1); + + if (userInfo.getProfile().isEmpty()){ + mBinding.jianj.setText(""); + mBinding.jianj.setVisibility(GONE); + }else { + mBinding.jianj.setText(userInfo.getProfile()); + mBinding.jianj.setVisibility(VISIBLE); + } + + if (!userInfo.getIcon().isEmpty()){ + mBinding.flexEntry.setVisibility(VISIBLE); + for (String url : userInfo.getIcon()) { + if (url.contains("http")) { + ImageView imageView1 = new ImageView(Application.getInstance()); + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, + Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20) + ); + params.setMargins(0, 0,Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距 + imageView1.setLayoutParams(params); + imageView1.setScaleType(ImageView.ScaleType.FIT_START); + + // 使用 Glide 加载图片 + ImageUtils.loadHeadCC(url, imageView1,params); + mBinding.flexEntry.addView(imageView1); + } + } + }else { + mBinding.flexEntry.setVisibility(GONE); + } + + + + ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.ivCp1); + ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.ivCp2); + ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT, + ConstraintLayout.LayoutParams.WRAP_CONTENT); + //挂件上的头像位置:0-上,1-右上,2-右,3-右下,4-下,5-左下,6-左,7-左上' + switch (Integer.parseInt(userInfo.getCp_info().direction)) { + case 0: + params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID; + params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID; + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL); + mBinding.ivCp2.setPadding(10, 0, 0, 0); + break; + case 1: + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL); + params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID; + params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID; + mBinding.ivCp2.setPadding(0, 10, 0, 0); + break; + case 2: + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL); + params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID; + params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID; + params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID; + break; + case 3: + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL); + params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID; + params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID; + break; + case 4: + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.HORIZONTAL); + params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID; + params.endToEnd = ConstraintLayout.LayoutParams.PARENT_ID; + params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID; + break; + case 5: + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL); + params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID; + params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID; + break; + case 6: + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL); + params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID; + params.bottomToBottom = ConstraintLayout.LayoutParams.PARENT_ID; + params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID; + break; + case 7: + mBinding.llCpAnimAvatar.setOrientation(LinearLayout.VERTICAL); + params.startToStart = ConstraintLayout.LayoutParams.PARENT_ID; + params.topToTop = ConstraintLayout.LayoutParams.PARENT_ID; + break; + } + mBinding.llCpAnimAvatar.setLayoutParams(params); + } } public void dianj(int type) { @@ -517,9 +666,9 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment - @@ -90,13 +89,13 @@ android:id="@+id/tv_gh" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/dp_5" android:ellipsize="end" android:lines="1" - android:maxWidth="@dimen/dp_120" + android:maxWidth="@dimen/dp_140" android:text="所属公会:" android:textColor="@color/colorWhite65" - android:textSize="@dimen/sp_10" - android:layout_marginTop="@dimen/dp_5" + android:textSize="@dimen/sp_12" app:layout_constraintStart_toStartOf="@+id/tv_id" app:layout_constraintTop_toBottomOf="@+id/tv_id" /> @@ -107,7 +106,7 @@ android:layout_marginStart="@dimen/dp_5" android:text="立即加入" android:textColor="#FF52FF96" - android:textSize="@dimen/sp_12" + android:textSize="@dimen/sp_13" app:layout_constraintBottom_toBottomOf="@+id/tv_gh" app:layout_constraintStart_toEndOf="@+id/tv_gh" /> @@ -116,11 +115,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_10" + android:layout_marginStart="@dimen/dp_8" app:alignContent="flex_start" app:alignItems="flex_start" app:flexWrap="wrap" - app:layout_constraintStart_toStartOf="@+id/tv_name" - app:layout_constraintTop_toBottomOf="@+id/tv_id" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/tv_join_guild" /> - - - - - + + app:layout_constraintBottom_toBottomOf="@+id/tv_placeholder" + app:layout_constraintEnd_toStartOf="@+id/tv_placeholder" + app:layout_constraintTop_toTopOf="@+id/tv_placeholder" /> + + @@ -232,9 +245,10 @@ android:id="@+id/room_jb" android:layout_width="@dimen/dp_44" android:layout_height="@dimen/dp_20" - android:layout_marginEnd="@dimen/dp_64" android:layout_marginTop="@dimen/dp_13" + android:layout_marginEnd="@dimen/dp_64" android:src="@mipmap/room_jb" + android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -245,10 +259,62 @@ android:layout_marginStart="@dimen/dp_20" android:layout_marginEnd="@dimen/dp_15" android:src="@mipmap/room_lh" + android:visibility="gone" app:layout_constraintBottom_toBottomOf="@+id/room_jb" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/room_jb" /> + + + + + + + + + + + + + + + + @@ -394,6 +464,7 @@ android:orientation="vertical"> @@ -481,6 +555,7 @@ android:paddingEnd="5dp" android:textColor="@color/white" android:textSize="@dimen/sp_9" + android:visibility="gone" tools:text="5天" /> @@ -493,47 +568,48 @@ + android:text="/@TA" + android:textColor="@color/white" + android:textSize="@dimen/sp_14" /> + android:text="发消息" + android:textColor="@color/white" + android:textSize="@dimen/sp_14" /> diff --git a/MainModule/src/main/res/layout/pop_menu.xml b/MainModule/src/main/res/layout/pop_menu.xml index 13499d50..10fd7803 100644 --- a/MainModule/src/main/res/layout/pop_menu.xml +++ b/MainModule/src/main/res/layout/pop_menu.xml @@ -1,97 +1,75 @@ - + android:text="闭 麦" /> + android:text="禁 言" /> + android:text="举 报" /> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a3ae9994..baae9017 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -202,15 +202,15 @@ android:exported="true" /> - - - + + + + + + + + + diff --git a/gradle.properties b/gradle.properties index 6be7fae0..00aaa91a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,8 +28,8 @@ isBuildModule=false #org.gradle.deamon=false android.injected.testOnly=false -APP_VERSION_NAME=1.0.6.3 -APP_VERSION_CODE=53 +APP_VERSION_NAME=1.0.6.4 +APP_VERSION_CODE=54 org.gradle.jvm.toolchain.useLegacyAdapters=false #org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15