Browse Source

feat: 私信个人信息&mine scoll

tongmengxiao 6 months ago
parent
commit
2efe620ec6

+ 20 - 6
home/src/main/java/com/swago/home/ChatDetailActivity.kt

@@ -88,13 +88,27 @@ class ChatDetailActivity  : BaseXActivity<ActivityChatDetailBinding>() {
             }
 
             override fun onUserIconClick(view: View?, position: Int, messageInfo: MessageInfo?) {
-                UserInfo.getUserInfo()?.let {
-                    PersonDataDFragment.newInstance(it.id,
-                        isAnchor = false,
-                        inRoom = false,
-                        isMessage = true
-                    ).show(supportFragmentManager,"PersonDataDFragment")
+                when(view?.id){
+                    R.id.left_user_icon_view ->{
+                        messageInfo?.let {
+                            PersonDataDFragment.newInstance(messageInfo.fromUser,
+                                isAnchor = false,
+                                inRoom = false,
+                                isMessage = true
+                            ).show(supportFragmentManager,"PersonDataDFragment")
+                        }
+                    }
+                    R.id.right_user_icon_view ->{
+                        UserInfo.getUserInfo()?.let {
+                            PersonDataDFragment.newInstance(it.id,
+                                isAnchor = false,
+                                inRoom = false,
+                                isMessage = true
+                            ).show(supportFragmentManager,"PersonDataDFragment")
+                        }
+                    }
                 }
+
             }
         })
     }

+ 84 - 79
home/src/main/res/layout/fragment_mine.xml

@@ -366,91 +366,96 @@
 
     </androidx.constraintlayout.widget.ConstraintLayout>
 
-
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:layout_marginTop="20dp"
-        android:orientation="vertical"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/frameLayout">
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvBlackList"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/icon_mine_black"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/blacklist"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvRoomManager"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:drawableStart="@mipmap/icon_mine_room_manager"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/room_manager"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvCustomService"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/icon_mine_custom"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/contact_service"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvModifyPassword"
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/ic_modify_pwd"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/change_password"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:textColor="#000"
-            android:textSize="16dp" />
-
-        <com.swago.baseswago.cusview.MediumTextView
-            android:id="@+id/tvSetting"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/icon_mine_setting"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:text="@string/app_settings"
-            android:textColor="#000"
-            android:textSize="16dp" />
+            android:layout_height="wrap_content"
+            android:layout_marginTop="20dp"
+            android:orientation="vertical">
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvBlackList"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/icon_mine_black"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/blacklist"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvRoomManager"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:visibility="gone"
+                tools:visibility="visible"
+                android:drawableStart="@mipmap/icon_mine_room_manager"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/room_manager"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvCustomService"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/icon_mine_custom"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/contact_service"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvModifyPassword"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/ic_modify_pwd"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/change_password"
+                android:visibility="gone"
+                tools:visibility="visible"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+            <com.swago.baseswago.cusview.MediumTextView
+                android:id="@+id/tvSetting"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/icon_mine_setting"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:text="@string/app_settings"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+
+        </LinearLayout>
+    </ScrollView>
 
 
-    </LinearLayout>
 
 </androidx.constraintlayout.widget.ConstraintLayout>