Переглянути джерело

feat: 私信个人信息&mine scoll

tongmengxiao 6 місяців тому
батько
коміт
ff6bdcd436

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

@@ -88,12 +88,25 @@ 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")
+                        }
+                    }
                 }
             }
         })

+ 101 - 95
home/src/main/res/layout/fragment_mine.xml

@@ -366,107 +366,113 @@
 
     </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"
+        <LinearLayout
             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" />
+            android:layout_height="0dp"
+            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/tvFamily"
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:drawableStart="@mipmap/icon_family"
+                android:drawableEnd="@mipmap/more_small"
+                android:drawablePadding="5dp"
+                android:gravity="center_vertical"
+                android:paddingStart="20dp"
+                android:paddingEnd="20dp"
+                android:visibility="gone"
+                tools:visibility="visible"
+                android:text="@string/family_menu"
+                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:layout_marginBottom="10dp"
+                android:text="@string/app_settings"
+                android:textColor="#000"
+                android:textSize="16dp" />
+
+
+        </LinearLayout>
+    </ScrollView>
 
 
-        <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/tvFamily"
-            android:layout_width="match_parent"
-            android:layout_height="50dp"
-            android:drawableStart="@mipmap/icon_family"
-            android:drawableEnd="@mipmap/more_small"
-            android:drawablePadding="5dp"
-            android:gravity="center_vertical"
-            android:paddingStart="20dp"
-            android:paddingEnd="20dp"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:text="@string/family_menu"
-            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>
 
 </androidx.constraintlayout.widget.ConstraintLayout>