Browse Source

修改测试问题

Pq 1 year ago
parent
commit
60f715fb58

+ 4 - 1
BaseLibrary/build.gradle

@@ -149,7 +149,10 @@ dependencies {
 
     api "com.github.tbruyelle:rxpermissions:0.12"
 
-    api 'com.github.mcxtzhang:SuspensionIndexBar:V1.0.0'
+    api ('com.github.mcxtzhang:SuspensionIndexBar:V1.0.0'){
+        exclude(group: 'com.github.promeg', module: 'tinypinyin')//tc IMSDK tinypinyin-2.0.1.jar里面有
+    }
+
     //金山云上传所需
     api 'joda-time:joda-time:2.9.9'
     api 'com.google.android:flexbox:2.0.1'

BIN
BaseLibrary/libs/tinypinyin-2.0.1.jar


+ 15 - 1
BaseLibrary/src/main/java/com/cooleshow/base/bean/StudentPageListBean.java

@@ -2,6 +2,11 @@ package com.cooleshow.base.bean;
 
 import android.os.Parcel;
 import android.os.Parcelable;
+import android.text.TextUtils;
+
+import com.cooleshow.base.utils.LOG;
+import com.mcxtzhang.indexlib.IndexBar.bean.BaseIndexPinyinBean;
+import com.mcxtzhang.indexlib.suspension.ISuspensionInterface;
 
 import java.util.List;
 
@@ -97,7 +102,7 @@ public class StudentPageListBean implements Parcelable {
         this.rows = rows;
     }
 
-    public static class RowsBean implements Parcelable {
+    public static class RowsBean extends BaseIndexPinyinBean implements Parcelable{
         /**
          * age : 0
          * avatar :
@@ -514,6 +519,14 @@ public class StudentPageListBean implements Parcelable {
         public RowsBean() {
         }
 
+        @Override
+        public String getTarget() {
+            LOG.i("username:"+username);
+            String result = TextUtils.isEmpty(username) ? "#" : username;
+            LOG.i("result:"+result);
+            return result;
+        }
+
         protected RowsBean(Parcel in) {
             this.age = in.readInt();
             this.avatar = in.readString();
@@ -561,6 +574,7 @@ public class StudentPageListBean implements Parcelable {
                 return new RowsBean[size];
             }
         };
+
     }
 
     @Override

+ 1 - 0
chatModule/build.gradle

@@ -59,6 +59,7 @@ dependencies {
     api project(':tuisearch')
     api project(':tuigroup')
     api project(':tuiofflinepush')
+    api project(':tuicontact')
 //    api project(':tuicallkit')
     //ARouter
     annotationProcessor("com.alibaba:arouter-compiler:$rootProject.ext.android.arouter_api_version")

+ 1 - 0
chatModule/src/main/AndroidManifest.xml

@@ -73,6 +73,7 @@
             android:name=".widget.CustomChatGroupTopRightIconExtension"
             android:authorities="${applicationId}.TUIGroup.ClassicUI.Init"
             android:enabled="true"
+            android:initOrder="9998"
             android:exported="false" />
 
 

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

@@ -66,6 +66,8 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
 
     private boolean isCanAddMember = false;
 
+    private ArrayList<GroupMemberBean> allMemberList;
+
     @Override
     public void onClick(View view) {
         if (view.getId() == R.id.ll_history_message) {
@@ -81,7 +83,7 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
             //查看联系人
             if (mAdapter != null) {
                 ARouter.getInstance().build(TCChatRouterPath.CHAT_GROUP_MEMBER)
-                        .withSerializable("list", (Serializable) mAdapter.getData())
+                        .withSerializable("list", allMemberList)
                         .navigation();
             }
         } else if (view.getId() == R.id.tv_group_apply_count) {
@@ -297,6 +299,7 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
             return;
         }
         if (mAdapter != null && data != null) {
+            this.allMemberList = new ArrayList<>(data);
             List<GroupMemberBean> result = new ArrayList<>();
             for (int i = 0; i < data.size(); i++) {
                 GroupMemberBean groupMemberBean = data.get(i);

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

@@ -128,8 +128,7 @@ public class CreateGroupActivity extends BaseMVPActivity<TcActivityCreateGroupBi
             viewBinding.csGroupType.setVisibility(View.VISIBLE);
             viewBinding.csMember.setVisibility(View.VISIBLE);
         }
-        String userId = UserHelper.getUserId();
-        mMemberAdapter = new CreateGroupMemberAdapter(userId);
+        mMemberAdapter = new CreateGroupMemberAdapter("");
         viewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
         viewBinding.recyclerView.setAdapter(mMemberAdapter);
 
@@ -182,6 +181,8 @@ public class CreateGroupActivity extends BaseMVPActivity<TcActivityCreateGroupBi
                 if (selectMembers != null) {
                     if (selectMembers.size() > 0) {
                         viewBinding.recyclerView.setVisibility(View.VISIBLE);
+                    }else{
+                        viewBinding.recyclerView.setVisibility(View.GONE);
                     }
                     if (mMemberAdapter != null) {
                         mMemberAdapter.setList(selectMembers);

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

@@ -66,6 +66,10 @@ public class NoticeEditActivity extends BaseMVPActivity<TcActivityNoticeEditBind
         id = intent.getStringExtra("id");
         cbRoof.setChecked(isTop);
         etTitle.setText(title);
+        if(TextUtils.isEmpty(title)){
+            //默认选中
+            cbRoof.setChecked(true);
+        }
         etNotice.setText(notice);
         btnCommit.setOnClickListener(v -> {
             String title = etTitle.getText().toString().trim();

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

@@ -19,7 +19,7 @@ import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.chatmodule.R;
 import com.cooleshow.chatmodule.constants.TCChatRouterPath;
 import com.cooleshow.chatmodule.contract.SetRemarksContract;
-import com.cooleshow.chatmodule.databinding.ActivitySetRemarkBinding;
+import com.cooleshow.chatmodule.databinding.TcActivitySetRemarkBinding;
 import com.cooleshow.chatmodule.presenter.SetRemarksPresenter;
 
 import androidx.annotation.Nullable;
@@ -31,7 +31,7 @@ import androidx.annotation.Nullable;
  * 类说明:
  */
 @Route(path = TCChatRouterPath.CHAT_GROUP_SET_REMARK)
-public class SetRemarksActivity extends BaseMVPActivity<ActivitySetRemarkBinding, SetRemarksPresenter> implements SetRemarksContract.SetRemarksView, View.OnClickListener {
+public class SetRemarksActivity extends BaseMVPActivity<TcActivitySetRemarkBinding, SetRemarksPresenter> implements SetRemarksContract.SetRemarksView, View.OnClickListener {
     @Override
     public void onClick(View v) {
         int id = v.getId();
@@ -95,8 +95,8 @@ public class SetRemarksActivity extends BaseMVPActivity<ActivitySetRemarkBinding
     }
 
     @Override
-    protected ActivitySetRemarkBinding getLayoutView() {
-        return ActivitySetRemarkBinding.inflate(getLayoutInflater());
+    protected TcActivitySetRemarkBinding getLayoutView() {
+        return TcActivitySetRemarkBinding.inflate(getLayoutInflater());
     }
 
     @Override

BIN
chatModule/src/main/res/drawable-xxhdpi/ic_input_del.png


+ 3 - 0
chatModule/src/main/res/layout/activity_set_remark.xml → chatModule/src/main/res/layout/tc_activity_set_remark.xml

@@ -22,6 +22,9 @@
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:layout_weight="1"
+            android:maxLines="1"
+            android:inputType="text"
+            android:maxLength="50"
             android:background="@color/transparent"
             android:gravity="center_vertical"
             android:paddingLeft="@dimen/dp_15"

+ 2 - 0
institution/src/main/java/com/cooleshow/institution/stu/ui/main/HomeCardFragment.java

@@ -185,6 +185,8 @@ public class HomeCardFragment extends BaseMVPFragment<FgHomeCardLayoutBinding, H
                 cPos = 0;
             }
             mViewBinding.viewPager.setCurrentItem(cPos, false);
+        }else{
+            loadEmpty(Constants.HOME_PAGE_STATUS_EMPTY);
         }
     }
 }

+ 6 - 2
institution/src/main/res/layout/fg_home_music_layout.xml

@@ -42,8 +42,12 @@
         app:layout_constraintTop_toBottomOf="@+id/view_status_bar" />
 
     <TextView
+        android:ellipsize="end"
+        android:maxLines="1"
+        android:layout_marginEnd="5dp"
+        app:layout_constraintRight_toLeftOf="@+id/iv_practice"
         android:id="@+id/tv_name"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="6dp"
         android:includeFontPadding="false"
@@ -53,7 +57,7 @@
         app:layout_constraintBottom_toBottomOf="@+id/iv_tag"
         app:layout_constraintLeft_toRightOf="@+id/iv_tag"
         app:layout_constraintTop_toTopOf="@+id/iv_tag"
-        tools:text="满天都是小星星机构" />
+        tools:text="满天都是小星星机构满天都是小星星机构满天都是小星星机构" />
 
     <FrameLayout
         android:visibility="gone"

+ 16 - 3
teacher/src/main/java/com/cooleshow/teacher/adapter/SelectTenantMemberAdapter.java

@@ -6,12 +6,15 @@ import android.widget.ImageView;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.viewholder.BaseViewHolder;
 import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.base.utils.SizeUtils;
 import com.cooleshow.teacher.R;
 import com.cooleshow.base.bean.StudentPageListBean;
 
 import java.util.ArrayList;
 
 import androidx.annotation.NonNull;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.recyclerview.widget.RecyclerView;
 
 /**
  * Author by pq, Date on 2023/9/15.
@@ -22,10 +25,10 @@ public class SelectTenantMemberAdapter extends BaseQuickAdapter<StudentPageListB
 
     public SelectTenantMemberAdapter(ArrayList<StudentPageListBean.RowsBean> defaultList) {
         super(R.layout.item_select_tenant_member_layout);
-        if(defaultList!=null){
+        if (defaultList != null) {
             selectMembers = new ArrayList<>(defaultList);
-        }else{
-            selectMembers =new ArrayList<>();
+        } else {
+            selectMembers = new ArrayList<>();
         }
     }
 
@@ -67,5 +70,15 @@ public class SelectTenantMemberAdapter extends BaseQuickAdapter<StudentPageListB
         } else {
             iv_check.setImageResource(com.cooleshow.base.R.drawable.icon_check_select_default);
         }
+
+
+        ConstraintLayout cs_root = holder.getView(R.id.cs_root);
+        RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) cs_root.getLayoutParams();
+        if (holder.getLayoutPosition() == getData().size() - 1) {
+            params.setMargins(0, 0, 0, SizeUtils.dp2px(71));
+        } else {
+            params.setMargins(0, 0, 0, 0);
+        }
+        cs_root.setLayoutParams(params);
     }
 }

+ 21 - 7
teacher/src/main/java/com/cooleshow/teacher/ui/mine/SelectTenantMemberActivity.java

@@ -1,6 +1,7 @@
 package com.cooleshow.teacher.ui.mine;
 
 import android.content.Intent;
+import android.graphics.Color;
 import android.os.Bundle;
 import android.os.Parcelable;
 import android.view.View;
@@ -14,7 +15,9 @@ import com.cooleshow.base.utils.SizeUtils;
 import com.cooleshow.base.utils.ToastUtil;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.base.widgets.CommonBottomItemDecoration;
+import com.cooleshow.base.widgets.CustomSuspensionDecoration;
 import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.chatmodule.widget.CustomIndexBarDataHelperImpl;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.SelectTenantMemberAdapter;
 import com.cooleshow.base.bean.StudentPageListBean;
@@ -39,6 +42,7 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
 public class SelectTenantMemberActivity extends BaseMVPActivity<AcSelectTenantMemberLayoutBinding, SelectTenantMemberPresenter> implements SelectTenantMemberContract.SelectTenantView, View.OnClickListener {
 
     private SelectTenantMemberAdapter mMemberAdapter;
+    private CustomSuspensionDecoration mDecoration;
 
 
     @Override
@@ -64,9 +68,20 @@ public class SelectTenantMemberActivity extends BaseMVPActivity<AcSelectTenantMe
         if (animator != null) {
             animator.setSupportsChangeAnimations(false);
         }
-        CommonBottomItemDecoration commonBottomItemDecoration = new CommonBottomItemDecoration(0, 0, SizeUtils.dp2px(71), 0);
-        viewBinding.recyclerView.addItemDecoration(commonBottomItemDecoration);
-        viewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
+
+        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
+        CustomIndexBarDataHelperImpl indexBarDataHelper = new CustomIndexBarDataHelperImpl();
+        viewBinding.livLetters.setDataHelper(indexBarDataHelper);
+        viewBinding.livLetters.setmPressedShowTextView(viewBinding.tvHint)//设置HintTextView
+                .setNeedRealIndex(false)//设置需要真实的索引
+                .setmLayoutManager(linearLayoutManager);//设置RecyclerView的LayoutManager
+
+
+        mDecoration = new CustomSuspensionDecoration(this, mMemberAdapter.getData());
+        mDecoration.setColorTitleBg(Color.TRANSPARENT);
+        mDecoration.setmTitleHeight(SizeUtils.dp2px(30));
+        viewBinding.recyclerView.addItemDecoration(mDecoration);
+        viewBinding.recyclerView.setLayoutManager(linearLayoutManager);
         viewBinding.recyclerView.setAdapter(mMemberAdapter);
         initListener();
 
@@ -116,6 +131,9 @@ public class SelectTenantMemberActivity extends BaseMVPActivity<AcSelectTenantMe
         }
         viewBinding.refreshLayout.finishRefresh();
         if (data != null && data.getRows() != null && data.getRows().size() > 0) {
+            mDecoration.setmDatas(data.getRows());
+            viewBinding.livLetters.setmSourceDatas(data.getRows())//设置数据
+                    .invalidate();
             mMemberAdapter.setList(data.getRows());
         } else {
             mMemberAdapter.getData().clear();
@@ -128,10 +146,6 @@ public class SelectTenantMemberActivity extends BaseMVPActivity<AcSelectTenantMe
         int id = v.getId();
         if (id == R.id.tv_confirm) {
             ArrayList<StudentPageListBean.RowsBean> selectList = mMemberAdapter.getSelect();
-            if (selectList == null || selectList.size() == 0) {
-                ToastUtil.getInstance().showShort("请选择群成员");
-                return;
-            }
             returnResult(selectList);
             return;
         }

+ 45 - 0
teacher/src/main/res/layout/ac_select_tenant_member_layout.xml

@@ -42,4 +42,49 @@
         android:textSize="@dimen/sp_14"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent" />
+
+
+    <com.mcxtzhang.indexlib.IndexBar.widget.IndexBar
+        android:id="@+id/liv_letters"
+        android:layout_width="@dimen/dp_20"
+        android:layout_height="0dp"
+        android:layout_marginTop="@dimen/dp_65"
+        android:layout_marginBottom="@dimen/dp_20"
+        android:paddingRight="@dimen/dp_10"
+        app:indexBarPressBackground="@color/white"
+        app:indexBarTextSize="@dimen/dp_12"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/refresh_layout"
+        app:layout_constraintVertical_bias="0.0" />
+
+    <View
+        android:id="@+id/spacer"
+        android:layout_width="@dimen/dp_58"
+        android:layout_height="@dimen/dp_58"
+        android:layout_marginEnd="@dimen/dp_5"
+        android:gravity="center"
+        android:paddingStart="8dp"
+        android:paddingBottom="@dimen/dp_3"
+        android:text="A"
+        android:textColor="@color/white"
+        android:textSize="@dimen/dp_45"
+        android:textStyle="bold"
+        app:layout_constraintBottom_toTopOf="@id/liv_letters"
+        app:layout_constraintRight_toLeftOf="@+id/liv_letters"/>
+
+    <TextView
+        android:id="@+id/tv_hint"
+        android:layout_width="@dimen/dp_58"
+        android:layout_height="@dimen/dp_58"
+        android:layout_marginTop="@dimen/dp_54"
+        android:background="@drawable/tc_ic_teacher_screen"
+        android:gravity="center"
+        android:text="A"
+        android:textColor="@color/white"
+        android:textSize="@dimen/dp_45"
+        android:textStyle="bold"
+        android:visibility="gone"
+        app:layout_constraintEnd_toEndOf="@+id/spacer"
+        app:layout_constraintTop_toTopOf="@id/spacer"/>
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 0
teacher/src/main/res/layout/item_select_tenant_member_layout.xml

@@ -3,6 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
+    android:id="@+id/cs_root"
     android:layout_height="wrap_content"
     android:background="@color/white"
     android:paddingStart="18dp"