Browse Source

修改测试问题

Pq 1 year ago
parent
commit
25c93ae9e1

+ 7 - 0
BaseLibrary/src/main/res/drawable/shape_59e5d5_to_2dc7aa.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners android:radius="10dp"/>
+    <gradient android:startColor="@color/color_59e5d5"
+        android:endColor="@color/color_2dc7aa"
+        android:angle="270"/>
+</shape>

+ 5 - 2
chatModule/src/main/java/com/cooleshow/chatmodule/ui/ChatGroupSettingActivity.java

@@ -204,7 +204,6 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
 
         if (BaseApplication.Companion.isTeacherClient()) {
             btnConfirm.setText("解散群组");
-            viewBinding.llChatJoinApply.setVisibility(View.VISIBLE);
         } else {
             btnConfirm.setText("发消息");
             viewBinding.llChatJoinApply.setVisibility(View.GONE);
@@ -347,7 +346,11 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
 
     private void checkTeacherCanAddMember(String type) {
         String tenantId = UserHelper.getTenantId();
-        isCanAddMember = UserHelper.isTenantAccount(tenantId) && TextUtils.equals(type, CreateGroupActivity.GROUP_TYPE_ORG);
+        if (BaseApplication.Companion.isTeacherClient()) {
+            boolean isOrgGroup = TextUtils.equals(type, CreateGroupActivity.GROUP_TYPE_ORG);
+            viewBinding.llChatJoinApply.setVisibility(isOrgGroup ? View.GONE : View.VISIBLE);
+            isCanAddMember = UserHelper.isTenantAccount(tenantId) && isOrgGroup;
+        }
     }
 
     @Override

+ 1 - 1
chatModule/src/main/java/com/cooleshow/chatmodule/ui/NoticeEditActivity.java

@@ -75,7 +75,7 @@ public class NoticeEditActivity extends BaseMVPActivity<TcActivityNoticeEditBind
             }
             String notice = etNotice.getText().toString().trim();
             if (TextUtils.isEmpty(notice)) {
-                ToastUtil.getInstance().showShort("请填写群公告,1-255字");
+                ToastUtil.getInstance().showShort("请填写群公告");
                 return;
             }
             if (TextUtils.isEmpty(NoticeEditActivity.this.title)) {

+ 106 - 48
chatModule/src/main/res/layout/tc_activity_notice_edit.xml

@@ -1,96 +1,154 @@
 <?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:background="@color/white"
     android:orientation="vertical">
 
     <include
         android:id="@+id/toolbar_include"
-        layout="@layout/common_toolbar_layout" />
+        layout="@layout/common_toolbar_layout"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
 
-    <com.cooleshow.base.widgets.ClearEditText
-        android:id="@+id/et_title"
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_marginTop="14dp"
+        android:id="@+id/cs_title"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="@color/white"
-        android:hint="请输入标题"
-        android:paddingStart="@dimen/dp_15"
-        android:paddingTop="@dimen/dp_18"
-        android:paddingBottom="@dimen/dp_13"
-        android:textColor="@color/black_444"
-        android:textSize="@dimen/dp_18"
-        />
+        android:paddingTop="15dp"
+        android:paddingBottom="15dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/toolbar_include">
+
+
+        <View
+            android:id="@+id/view_line1"
+            android:layout_width="4dp"
+            android:layout_height="14dp"
+            android:layout_marginStart="12dp"
+            android:background="@drawable/shape_59e5d5_to_2dc7aa"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/tv_title" />
+
+        <TextView
+            android:id="@+id/tv_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="7dp"
+            android:text="标题"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/sp_17"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toRightOf="@+id/view_line1"
+            app:layout_constraintTop_toTopOf="parent" />
 
-    <View
-        style="@style/line_style"
-        android:layout_marginStart="@dimen/dp_15"
-        android:layout_marginEnd="@dimen/dp_15"/>
+        <androidx.appcompat.widget.AppCompatEditText
+            android:id="@+id/et_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/white"
+            android:hint="请输入标题(1-25字)"
+            android:maxLength="25"
+            android:paddingEnd="12dp"
+            android:paddingStart="@dimen/dp_12"
+            android:paddingTop="@dimen/dp_12"
+            android:paddingBottom="@dimen/dp_12"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/dp_14"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_title" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
 
-    <EditText
-        android:id="@+id/et_notice"
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/cs_content"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_200"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="12dp"
         android:background="@color/white"
-        android:gravity="start|top"
-        android:hint="请填写群公告,1-255字"
-        android:maxLength="225"
-        android:padding="@dimen/dp_15"
-        android:textColor="#ff808080"
-        android:textSize="@dimen/dp_16"
-        />
+        android:paddingTop="15dp"
+        android:paddingBottom="15dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/cs_title">
+
+        <View
+            android:id="@+id/view_line2"
+            android:layout_width="4dp"
+            android:layout_height="14dp"
+            android:layout_marginStart="12dp"
+            android:background="@drawable/shape_59e5d5_to_2dc7aa"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_content"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/tv_content" />
 
-    <View
-        style="@style/line_style"
-        android:layout_height="@dimen/dp_15"/>
+        <TextView
+            android:id="@+id/tv_content"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="7dp"
+            android:layout_marginTop="10dp"
+            android:text="公告内容"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/sp_17"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toRightOf="@+id/view_line2"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <EditText
+            android:id="@+id/et_notice"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_200"
+            android:background="@color/white"
+            android:gravity="start|top"
+            android:hint="请填写群公告 (1-255字)"
+            android:maxLength="255"
+            android:padding="@dimen/dp_12"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/dp_14"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/tv_content" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
 
     <CheckBox
+        android:layout_marginTop="12dp"
         android:id="@+id/cb_roof"
         android:layout_width="match_parent"
         android:layout_height="@dimen/dp_50"
         android:background="@color/white"
         android:button="@null"
         android:checked="true"
-        android:drawableEnd="@drawable/message_on_off_selector"
+        android:drawableEnd="@drawable/tc_switch_selector"
         android:paddingStart="@dimen/dp_15"
         android:paddingEnd="@dimen/dp_15"
         android:text="设为置顶"
-        android:textColor="@color/black_444"
-        android:textSize="@dimen/dp_16"/>
+        android:textColor="@color/color_333333"
+        android:textSize="@dimen/dp_16"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/cs_content" />
 
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@color/divide_color"
-        android:paddingStart="@dimen/dp_15"
-        android:paddingTop="@dimen/dp_4"
-        android:text="开启后,本公告将自动发给新成员,仅可设置一条。"
-        android:textColor="#ff999999"
-        android:textSize="14sp"
-        android:visibility="gone"
-        />
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="@dimen/dp_0"
         android:layout_weight="1"
-        android:background="@color/divide_color"
         android:orientation="vertical"
-        android:paddingTop="@dimen/dp_108">
+        android:paddingTop="@dimen/dp_108"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/cb_roof">
 
         <Button
             android:id="@+id/btn_commit"
             style="?android:attr/borderlessButtonStyle"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/dp_50"
+            android:layout_height="@dimen/dp_44"
             android:layout_marginStart="@dimen/dp_28"
             android:layout_marginEnd="@dimen/dp_28"
             android:layout_marginBottom="@dimen/dp_95"
             android:background="@drawable/btn_primary_default_shape"
             android:text="发布"
             android:textColor="@color/white"
-            android:textSize="@dimen/dp_16"
-            />
+            android:textSize="@dimen/dp_16" />
     </LinearLayout>
-
 </LinearLayout>

+ 0 - 0
classRoom/src/main/res/drawable-xhdpi/icon_switch_off.png → classRoom/src/main/res/drawable-xhdpi/icon_switch_off_black.png


+ 0 - 0
classRoom/src/main/res/drawable-xxhdpi/icon_switch_off.png → classRoom/src/main/res/drawable-xxhdpi/icon_switch_off_black.png