瀏覽代碼

修改老师端首页UI问题

Pq 3 年之前
父節點
當前提交
a0e954c9eb
共有 1 個文件被更改,包括 11 次插入9 次删除
  1. 11 9
      teacher/src/main/java/com/cooleshow/teacher/widgets/HomeHotMusicSheetItemView.java

+ 11 - 9
teacher/src/main/java/com/cooleshow/teacher/widgets/HomeHotMusicSheetItemView.java

@@ -91,6 +91,17 @@ public class HomeHotMusicSheetItemView extends FrameLayout {
         if (mTvUploadAuthor != null) {
             mTvUploadAuthor.setText(String.format("上传者:%s", data.addName));
         }
+
+        mLlMusicSubject.removeAllViews();
+        if (!TextUtils.isEmpty(data.subjectNames)) {
+            String[] split = data.subjectNames.split(",");
+            if (split != null && split.length > 0) {
+                for (int i = 0; i < split.length; i++) {
+                    createSubjectView(split[i]);
+                }
+            }
+        }
+
         if (TextUtils.equals(data.chargeType, CHARGE_TYPE_FREE)) {
             mTvTag.setText("免费");
             mTvTag.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_01b84f));
@@ -108,15 +119,6 @@ public class HomeHotMusicSheetItemView extends FrameLayout {
             mTvTag.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_3591ce));
             mTvTag.setBackgroundResource(R.drawable.shape_3591ce_border);
         }
-        mLlMusicSubject.removeAllViews();
-        if (!TextUtils.isEmpty(data.subjectNames)) {
-            String[] split = data.subjectNames.split(",");
-            if (split != null && split.length > 0) {
-                for (int i = 0; i < split.length; i++) {
-                    createSubjectView(split[i]);
-                }
-            }
-        }
     }
 
     private void createSubjectView(String text) {