Browse Source

修改部分问题

Pq 8 months ago
parent
commit
de16333b57

+ 1 - 1
BaseLibrary/build.gradle

@@ -108,7 +108,7 @@ dependencies {
     api "com.github.bumptech.glide:glide:$rootProject.ext.android.glide_version"
     kapt "com.github.bumptech.glide:compiler:$rootProject.ext.android.glide_version"
     //Banner
-    api 'io.github.youth5201314:banner:2.2.2'
+    api 'io.github.youth5201314:banner:2.2.3'
 
     // BottomNavigation
     api 'com.ashokvarma.android:bottom-navigation-bar:2.2.0'

+ 15 - 5
BaseLibrary/src/main/java/com/cooleshow/base/widgets/dialog/CourseTipDialog.java

@@ -16,6 +16,7 @@ import com.cooleshow.base.bean.CourseTipBean;
 import com.cooleshow.base.common.WebConstants;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.utils.JumpUtils;
+import com.cooleshow.base.utils.ThreadUtils;
 import com.youth.banner.Banner;
 import com.youth.banner.adapter.BannerAdapter;
 import com.youth.banner.adapter.BannerImageAdapter;
@@ -88,10 +89,19 @@ public class CourseTipDialog extends Dialog implements View.OnClickListener {
     }
 
     public void setSelect(int currentPos) {
-        int itemCount = mBanner.getItemCount();
-        if (currentPos < itemCount) {
-            mBanner.setCurrentItem(currentPos, false);
-            mBanner.getIndicator().onPageChanged(itemCount, currentPos);
+        if (mBanner != null) {
+            ThreadUtils.getMainHandler().post(new Runnable() {
+                @Override
+                public void run() {
+                    if (mBanner != null) {
+                        int itemCount = mBanner.getItemCount();
+                        if (currentPos < itemCount) {
+                            mBanner.setCurrentItem(currentPos, false);
+                            mBanner.getIndicator().onPageChanged(itemCount, currentPos);
+                        }
+                    }
+                }
+            });
         }
     }
 
@@ -109,7 +119,7 @@ public class CourseTipDialog extends Dialog implements View.OnClickListener {
 
     public void showCustomData(List<CourseTipBean> data) {
         mBannerAdapter.setDatas(data);
-        if(data.size()<=1){
+        if (data.size() <= 1) {
             mBanner.removeIndicator();
         }
     }

+ 1 - 0
BaseLibrary/src/main/res/layout/item_dialog_course_tip_layout.xml

@@ -27,6 +27,7 @@
         android:textSize="@dimen/sp_13"
         android:layout_marginTop="10dp"
         android:lineSpacingMultiplier="1.2"
+        android:minHeight="242dp"
         android:textColor="@color/color_777777"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"/>

+ 1 - 1
student/src/main/java/com/cooleshow/student/adapter/VideoCourseAppointAdapter.java

@@ -63,6 +63,6 @@ public class VideoCourseAppointAdapter extends BaseQuickAdapter<VideoCourseListB
         ImageView iv_avatar=helper.getView(R.id.iv_avatar);
         GlideUtils.INSTANCE.loadImage(getContext(),item.getAvatar(),iv_avatar,R.drawable.icon_teacher_default_head);
         TextView tv_teacher_name = helper.getView(R.id.tv_teacher_name);
-        tv_teacher_name.setText(item.getTeacherName());
+        tv_teacher_name.setText(item.getUserName());
     }
 }

+ 7 - 5
teacher/src/main/java/com/cooleshow/teacher/ui/minestyle/MineStylePageActivity.java

@@ -410,6 +410,13 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
         viewBinding.tvCourseTimeSettingStatus.setText(styleInfoBean.courseTimeFlag ? "已设置" : "未设置");
         //个人介绍
         viewBinding.etSelfIntroduction.setText(styleInfoBean.introduction);
+
+        //有数据的情况不重复刷新 防止跟编辑可授乐器逻辑冲突
+        List<TeachableInstrumentBean> data = teachableSelectAdapter.getData();
+        if (data!=null && data.size()>0) {
+            return;
+        }
+
         //视频信息
         if (mMineStyleVideoListAdapter != null) {
             videoBeanList.clear();
@@ -418,11 +425,6 @@ public class MineStylePageActivity extends BaseMVPActivity<ActivityMineStylePage
             mMineStyleVideoListAdapter.notifyDataSetChanged();
         }
 
-        //有数据的情况不重复刷新 防止跟编辑可授乐器逻辑冲突
-        List<TeachableInstrumentBean> data = teachableSelectAdapter.getData();
-        if (data!=null && data.size()>0) {
-            return;
-        }
         selectTeachableInstrument.clear();
         if (!TextUtils.isEmpty(styleInfoBean.subjectId)) {
             if (styleInfoBean.subjectId.contains(",")) {