瀏覽代碼

修改创建群页面报错问题

Pq 1 年之前
父節點
當前提交
08b0456d41

二進制
BaseLibrary/src/main/res/drawable-xhdpi/icon_check_normal2.png


二進制
BaseLibrary/src/main/res/drawable-xhdpi/icon_check_select2.png


二進制
BaseLibrary/src/main/res/drawable-xxhdpi/icon_check_normal2.png


二進制
BaseLibrary/src/main/res/drawable-xxhdpi/icon_check_select2.png


+ 6 - 0
BaseLibrary/src/main/res/drawable/selector_check_bt_20dp.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/icon_check_select2" android:state_enabled="true" />
+    <item android:drawable="@drawable/icon_check_select2" android:state_checked="true" />
+    <item android:drawable="@drawable/icon_check_normal2"/>
+</selector>

+ 4 - 4
chatModule/src/main/java/com/cooleshow/chatmodule/ui/CreateGroupActivity.java

@@ -13,7 +13,7 @@ import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.chatmodule.R;
 import com.cooleshow.chatmodule.constants.TCChatRouterPath;
 import com.cooleshow.chatmodule.contract.CreateGroupContract;
-import com.cooleshow.chatmodule.databinding.ActivityCreateGroupBinding;
+import com.cooleshow.chatmodule.databinding.TcActivityCreateGroupBinding;
 import com.cooleshow.chatmodule.presenter.CreateGroupPresenter;
 
 import androidx.annotation.Nullable;
@@ -25,7 +25,7 @@ import androidx.annotation.Nullable;
  * 类说明:
  */
 @Route(path = TCChatRouterPath.CHAT_CREATE_GROUP)
-public class CreateGroupActivity extends BaseMVPActivity<ActivityCreateGroupBinding, CreateGroupPresenter> implements CreateGroupContract.CreateGroupView, View.OnClickListener {
+public class CreateGroupActivity extends BaseMVPActivity<TcActivityCreateGroupBinding, CreateGroupPresenter> implements CreateGroupContract.CreateGroupView, View.OnClickListener {
     @Override
     public void onClick(View view) {
         if (view.getId() == R.id.tv_create) {
@@ -55,8 +55,8 @@ public class CreateGroupActivity extends BaseMVPActivity<ActivityCreateGroupBind
     }
 
     @Override
-    protected ActivityCreateGroupBinding getLayoutView() {
-        return ActivityCreateGroupBinding.inflate(getLayoutInflater());
+    protected TcActivityCreateGroupBinding getLayoutView() {
+        return TcActivityCreateGroupBinding.inflate(getLayoutInflater());
     }
 
     @Override

二進制
chatModule/src/main/res/drawable-xhdpi/icon_create_group_type_tag.png


二進制
chatModule/src/main/res/drawable-xhdpi/icon_group_des_tag.png


二進制
chatModule/src/main/res/drawable-xhdpi/icon_group_members_tag.png


二進制
chatModule/src/main/res/drawable-xhdpi/icon_group_name_tag.png


二進制
chatModule/src/main/res/drawable-xxhdpi/icon_create_group_type_tag.png


二進制
chatModule/src/main/res/drawable-xxhdpi/icon_group_des_tag.png


二進制
chatModule/src/main/res/drawable-xxhdpi/icon_group_members_tag.png


二進制
chatModule/src/main/res/drawable-xxhdpi/icon_group_name_tag.png


+ 0 - 151
chatModule/src/main/res/layout/activity_create_group.xml

@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <include
-        android:id="@+id/toolbar_include"
-        layout="@layout/common_toolbar_layout" />
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_marginLeft="@dimen/dp_14"
-        android:layout_marginTop="@dimen/dp_15"
-        android:paddingStart="12dp"
-        android:paddingEnd="12dp"
-        android:layout_marginRight="@dimen/dp_14"
-        android:background="@drawable/bg_white_10dp"
-        android:layout_height="46dp">
-
-        <TextView
-            android:id="@+id/tv_group_type"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="群类型"
-            android:textColor="@color/black"
-            android:textSize="@dimen/sp_17"
-            android:textStyle="bold"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_82"
-        android:layout_marginLeft="@dimen/dp_14"
-        android:layout_marginTop="@dimen/dp_12"
-        android:layout_marginRight="@dimen/dp_14"
-        android:background="@drawable/bg_white_10dp">
-
-        <TextView
-            android:id="@+id/tv_star"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_21"
-            android:layout_marginTop="@dimen/dp_12"
-            android:text="*"
-            android:textColor="@color/color_ff4e1a"
-            android:textSize="@dimen/sp_17"
-            android:textStyle="bold"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-
-        <TextView
-            android:id="@+id/tv_group_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="群名称"
-            android:textColor="@color/black"
-            android:textSize="@dimen/sp_17"
-            android:textStyle="bold"
-            app:layout_constraintBottom_toBottomOf="@+id/tv_star"
-            app:layout_constraintLeft_toRightOf="@+id/tv_star"
-            app:layout_constraintTop_toTopOf="@+id/tv_star" />
-
-        <EditText
-            android:id="@+id/et_group_name"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:background="@null"
-            android:gravity="left"
-            android:hint="请输入群聊名称"
-            android:inputType="text"
-            android:lines="1"
-            android:maxLength="50"
-            android:paddingLeft="@dimen/dp_21"
-            android:paddingTop="@dimen/dp_8"
-            android:paddingRight="@dimen/dp_21"
-            android:paddingBottom="@dimen/dp_16"
-            android:textColor="@color/color_333333"
-            android:textColorHint="@color/color_ffc1c1c1"
-            android:textSize="@dimen/sp_16"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/tv_group_name" />
-
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_191"
-        android:layout_marginLeft="@dimen/dp_14"
-        android:layout_marginTop="@dimen/dp_12"
-        android:layout_marginRight="@dimen/dp_14"
-        android:background="@drawable/bg_white_10dp">
-
-        <TextView
-            android:id="@+id/tv_introduction"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_21"
-            android:layout_marginTop="@dimen/dp_12"
-            android:text="群简介"
-            android:textColor="@color/black"
-            android:textSize="@dimen/sp_17"
-            android:textStyle="bold"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <EditText
-            android:id="@+id/et_introduction"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:background="@null"
-            android:gravity="left"
-            android:hint="请输入群简介"
-            android:inputType="text"
-            android:lines="1"
-            android:maxLength="50"
-            android:paddingLeft="@dimen/dp_21"
-            android:paddingTop="@dimen/dp_8"
-            android:paddingRight="@dimen/dp_21"
-            android:paddingBottom="@dimen/dp_16"
-            android:textColor="@color/color_333333"
-            android:textColorHint="@color/color_ffc1c1c1"
-            android:textSize="@dimen/sp_16"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintLeft_toLeftOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/tv_introduction" />
-
-
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-
-    <TextView
-        android:id="@+id/tv_create"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_44"
-        android:layout_marginLeft="@dimen/dp_28"
-        android:layout_marginTop="@dimen/dp_31"
-        android:layout_marginRight="@dimen/dp_28"
-        android:background="@drawable/shape_click_btn"
-        android:gravity="center"
-        android:text="确认创建"
-        android:textColor="@color/white"
-        android:textSize="@dimen/sp_18" />
-</LinearLayout>

+ 265 - 0
chatModule/src/main/res/layout/tc_activity_create_group.xml

@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:orientation="vertical">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+    <androidx.core.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                tools:visibility="visible"
+                android:id="@+id/cs_group_type"
+                android:layout_width="match_parent"
+                android:layout_height="46dp"
+                android:layout_marginLeft="@dimen/dp_14"
+                android:layout_marginTop="@dimen/dp_15"
+                android:layout_marginRight="@dimen/dp_14"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingStart="12dp"
+                android:paddingEnd="12dp"
+                android:visibility="gone">
+
+                <TextView
+                    android:id="@+id/tv_group_type"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:drawableStart="@drawable/icon_create_group_type_tag"
+                    android:drawablePadding="3dp"
+                    android:includeFontPadding="false"
+                    android:text="群类型"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/sp_17"
+                    android:textStyle="bold"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+
+                <RadioGroup
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="parent">
+
+                    <RadioButton
+                        android:id="@+id/rb_fans_group_type"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="12dp"
+                        android:background="@color/transparent"
+                        android:button="@null"
+                        android:checked="false"
+                        android:drawableStart="@drawable/selector_check_bt_20dp"
+                        android:drawablePadding="7dp"
+                        android:includeFontPadding="false"
+                        android:text="粉丝群"
+                        android:textColor="@color/color_666666"
+                        android:textSize="@dimen/sp_16" />
+
+
+                    <RadioButton
+                        android:checked="false"
+                        android:id="@+id/rb_jg_group_type"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:background="@color/transparent"
+                        android:button="@null"
+                        android:drawableStart="@drawable/selector_check_bt_20dp"
+                        android:drawablePadding="7dp"
+                        android:includeFontPadding="false"
+                        android:text="机构群"
+                        android:textColor="@color/color_666666"
+                        android:textSize="@dimen/sp_16" />
+                </RadioGroup>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_82"
+                android:layout_marginLeft="@dimen/dp_14"
+                android:layout_marginTop="@dimen/dp_12"
+                android:layout_marginRight="@dimen/dp_14"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingStart="12dp"
+                android:paddingEnd="12dp">
+
+                <TextView
+                    android:id="@+id/tv_star"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_12"
+                    android:drawableStart="@drawable/icon_group_name_tag"
+                    android:drawablePadding="3dp"
+                    android:text="*"
+                    android:textColor="@color/color_ff4e1a"
+                    android:textSize="@dimen/sp_17"
+                    android:textStyle="bold"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+
+                <TextView
+                    android:id="@+id/tv_group_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="群名称"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/sp_17"
+                    android:textStyle="bold"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_star"
+                    app:layout_constraintLeft_toRightOf="@+id/tv_star"
+                    app:layout_constraintTop_toTopOf="@+id/tv_star" />
+
+                <EditText
+                    android:id="@+id/et_group_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:background="@null"
+                    android:gravity="left"
+                    android:hint="请输入群聊名称"
+                    android:inputType="text"
+                    android:lines="1"
+                    android:maxLength="50"
+                    android:paddingLeft="@dimen/dp_21"
+                    android:paddingTop="@dimen/dp_8"
+                    android:paddingRight="@dimen/dp_21"
+                    android:paddingBottom="@dimen/dp_16"
+                    android:textColor="@color/color_333333"
+                    android:textColorHint="@color/color_ffc1c1c1"
+                    android:textSize="@dimen/sp_16"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_group_name" />
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_191"
+                android:layout_marginLeft="@dimen/dp_14"
+                android:layout_marginTop="@dimen/dp_12"
+                android:layout_marginRight="@dimen/dp_14"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingStart="12dp"
+                android:paddingEnd="12dp">
+
+                <TextView
+                    android:id="@+id/tv_introduction"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_12"
+                    android:drawableStart="@drawable/icon_group_des_tag"
+                    android:drawablePadding="3dp"
+                    android:text="群简介"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/sp_17"
+                    android:textStyle="bold"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <EditText
+                    android:id="@+id/et_introduction"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:background="@null"
+                    android:gravity="left"
+                    android:hint="请输入群简介"
+                    android:inputType="text"
+                    android:lines="1"
+                    android:maxLength="50"
+                    android:paddingLeft="@dimen/dp_21"
+                    android:paddingTop="@dimen/dp_8"
+                    android:paddingRight="@dimen/dp_21"
+                    android:paddingBottom="@dimen/dp_16"
+                    android:textColor="@color/color_333333"
+                    android:textColorHint="@color/color_ffc1c1c1"
+                    android:textSize="@dimen/sp_16"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_introduction" />
+
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/cs_member"
+                android:layout_width="match_parent"
+                android:layout_height="140dp"
+                android:layout_marginLeft="@dimen/dp_14"
+                android:layout_marginTop="@dimen/dp_15"
+                android:layout_marginRight="@dimen/dp_14"
+                android:background="@drawable/bg_white_10dp"
+                android:paddingStart="12dp"
+                tools:visibility="visible"
+                android:visibility="gone">
+
+                <TextView
+                    android:id="@+id/tv_members_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_12"
+                    android:drawableStart="@drawable/icon_group_members_tag"
+                    android:drawablePadding="3dp"
+                    android:text="群成员"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/sp_17"
+                    android:textStyle="bold"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintTop_toTopOf="parent" />
+
+                <androidx.recyclerview.widget.RecyclerView
+                    android:id="@+id/recyclerView"
+                    android:layout_width="0dp"
+                    android:layout_height="0dp"
+                    android:overScrollMode="never"
+                    android:scrollbars="none"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintLeft_toLeftOf="parent"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/tv_members_title" />
+
+                <TextView
+                    android:paddingEnd="29dp"
+                    android:id="@+id/tv_add_members"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="添加"
+                    android:textColor="@color/color_333333"
+                    android:textSize="@dimen/sp_16"
+                    app:layout_constraintBottom_toBottomOf="@+id/tv_members_title"
+                    app:layout_constraintRight_toRightOf="parent"
+                    app:layout_constraintTop_toTopOf="@+id/tv_members_title" />
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <TextView
+                android:id="@+id/tv_create"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_44"
+                android:layout_marginLeft="@dimen/dp_28"
+                android:layout_marginTop="@dimen/dp_31"
+                android:layout_marginRight="@dimen/dp_28"
+                android:background="@drawable/shape_click_btn"
+                android:gravity="center"
+                android:text="确认创建"
+                android:textColor="@color/white"
+                android:textSize="@dimen/sp_18" />
+        </LinearLayout>
+    </androidx.core.widget.NestedScrollView>
+</LinearLayout>

+ 1 - 1
usercenter/src/main/java/com/cooleshow/usercenter/helper/UserHelper.java

@@ -163,7 +163,7 @@ public class UserHelper {
         //机构id
         SPUtils.getInstance().put(TENANTID_KEY, userInfo.getTenantId());
         //机构名称
-        SPUtils.getInstance().put(TENANTID_KEY, userInfo.getTenantName());
+        SPUtils.getInstance().put(TENANTNAME_KEY, userInfo.getTenantName());
 
     }