Selaa lähdekoodia

修改群公告部分问题

Pq 1 kuukausi sitten
vanhempi
commit
5d6174f410

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

@@ -53,7 +53,7 @@ public class NoticeDetailActivity extends BaseMVPActivity<TcActivityNoticeDetail
 
     @Override
     protected void initView() {
-        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "公告");
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "公告详情");
         if (BaseApplication.Companion.isTeacherClient()) {
             viewBinding.ivSetting.setVisibility(View.VISIBLE);
         }else{

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

@@ -90,22 +90,22 @@ public class NoticeEditActivity extends BaseMVPActivity<TcActivityNoticeEditBind
 
     @Override
     protected void initView() {
-        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "群公告编辑");
         etNotice = viewBinding.etNotice;
         etTitle = viewBinding.etTitle;
         cbRoof = viewBinding.cbRoof;
         btnCommit = viewBinding.btnCommit;
 
-
         Intent intent = getIntent();
         targetId = intent.getStringExtra("targetId");
         title = intent.getStringExtra("title");
+        boolean isCreate = TextUtils.isEmpty(title);
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, isCreate ? "新建群公告" : "编辑群公告");
         notice = intent.getStringExtra("notice");
         isTop = intent.getBooleanExtra("isTop", false);
         id = intent.getStringExtra("id");
         cbRoof.setChecked(isTop);
         etTitle.setText(title);
-        if(TextUtils.isEmpty(title)){
+        if (isCreate) {
             //默认选中
             cbRoof.setChecked(true);
         }
@@ -129,7 +129,7 @@ public class NoticeEditActivity extends BaseMVPActivity<TcActivityNoticeEditBind
                 return;
             }
             if (TextUtils.isEmpty(NoticeEditActivity.this.title)) {
-                presenter.createGroupNotice(title,notice,targetId, cbRoof.isChecked() );
+                presenter.createGroupNotice(title, notice, targetId, cbRoof.isChecked());
             } else {
                 presenter.noticeUpdate(id, targetId, title, notice, cbRoof.isChecked());
             }

+ 6 - 13
chatModule/src/main/res/layout/tc_activity_notice_detail_layout.xml

@@ -42,34 +42,27 @@
             android:textColor="@color/color_333333"
             android:textSize="@dimen/sp_16"
             android:textStyle="bold"
-            app:layout_constraintEnd_toStartOf="@+id/tv_group_tag"
+            app:layout_constraintEnd_toStartOf="@+id/iv_group_tag"
             app:layout_constraintHorizontal_bias="0"
             app:layout_constraintHorizontal_chainStyle="packed"
             app:layout_constraintStart_toEndOf="@id/iv_portrait"
             app:layout_constraintTop_toTopOf="@id/iv_portrait"
             app:layout_constraintWidth_default="wrap"
-            tools:text="陈老师" />
+            tools:text="陈老师陈老师陈老师陈老师陈老师陈老师陈老师陈老师陈老师陈老师" />
 
-        <TextView
-            android:id="@+id/tv_group_tag"
+        <ImageView
+            android:id="@+id/iv_group_tag"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="@dimen/dp_4"
             android:layout_marginEnd="12dp"
             android:gravity="center"
-            android:paddingStart="6dp"
-            android:paddingTop="1dp"
-            android:paddingEnd="6dp"
-            android:paddingBottom="1dp"
-            android:text="老师"
-            android:textColor="@color/white"
-            android:textSize="@dimen/sp_11"
-            android:visibility="gone"
+            android:src="@drawable/icon_teacher_tag"
             app:layout_constraintBottom_toBottomOf="@+id/tv_name"
             app:layout_constraintLeft_toRightOf="@+id/tv_name"
             app:layout_constraintRight_toLeftOf="@+id/iv_setting"
             app:layout_constraintTop_toTopOf="@+id/tv_name"
-            tools:visibility="gone" />
+            tools:visibility="visible" />
 
 
         <TextView