瀏覽代碼

添加活动奖品入口

Pq 2 年之前
父節點
當前提交
94e949a739

+ 2 - 0
student/src/main/java/com/cooleshow/student/adapter/HomeHotAlbumAdapter.java

@@ -37,9 +37,11 @@ public class HomeHotAlbumAdapter extends BaseQuickAdapter<HotAlbumBean.RowsBean,
         TextView tv_payment_type = helper.getView(R.id.tv_payment_type);
         if (!TextUtils.isEmpty(item.paymentType) && TextUtils.equals(item.paymentType, "CHARGE")) {
             //收费
+            tv_payment_type.setVisibility(View.VISIBLE);
             tv_payment_type.setText("付费");
         } else {
             //免费
+            tv_payment_type.setVisibility(View.GONE);
             tv_payment_type.setText("免费");
         }
     }

+ 7 - 0
student/src/main/java/com/cooleshow/student/ui/main/MineFragment.java

@@ -180,6 +180,11 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
                 //联系我们
                 WebStartHelper.startContactUs();
                 break;
+            case R.id.iv_award:
+            case R.id.tv_award_title:
+                //活动领奖
+                WebStartHelper.startAwardPage();
+                break;
         }
     }
 
@@ -241,6 +246,8 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
         mViewBinding.tvTradeRecordTitle.setOnClickListener(this);
         mViewBinding.ivCoupon.setOnClickListener(this);
         mViewBinding.tvCouponTitle.setOnClickListener(this);
+        mViewBinding.ivAward.setOnClickListener(this);
+        mViewBinding.tvAwardTitle.setOnClickListener(this);
 
         mViewBinding.tvNetworkDetection.setOnClickListener(this);
         mViewBinding.tvDeviceDetection.setOnClickListener(this);

二進制
student/src/main/res/drawable-xhdpi/icon_mine_award.png


二進制
student/src/main/res/drawable-xxhdpi/icon_mine_award.png


+ 15 - 3
student/src/main/res/layout/fragment_mine_layout.xml

@@ -526,15 +526,15 @@
             android:layout_height="42dp"
             android:src="@drawable/icon_mine_coupon"
             app:layout_constraintLeft_toRightOf="@+id/iv_trade_record"
-            app:layout_constraintRight_toLeftOf="@+id/iv_other"
+            app:layout_constraintRight_toLeftOf="@+id/iv_award"
             app:layout_constraintTop_toTopOf="@+id/iv_order" />
 
         <ImageView
-            android:id="@+id/iv_other"
+            android:src="@drawable/icon_mine_award"
+            android:id="@+id/iv_award"
             android:layout_width="42dp"
             android:layout_height="42dp"
             android:layout_marginEnd="24dp"
-            android:visibility="invisible"
             app:layout_constraintLeft_toRightOf="@+id/iv_coupon"
             app:layout_constraintRight_toRightOf="@+id/view_serve_tools"
             app:layout_constraintTop_toTopOf="@+id/iv_order" />
@@ -579,6 +579,18 @@
             app:layout_constraintRight_toRightOf="@+id/iv_coupon"
             app:layout_constraintTop_toBottomOf="@+id/iv_coupon" />
 
+        <TextView
+            android:id="@+id/tv_award_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:paddingTop="7dp"
+            android:paddingBottom="20dp"
+            android:text="活动奖品"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/sp_12"
+            app:layout_constraintLeft_toLeftOf="@+id/iv_award"
+            app:layout_constraintRight_toRightOf="@+id/iv_award"
+            app:layout_constraintTop_toBottomOf="@+id/iv_award" />
 
         <androidx.constraintlayout.widget.ConstraintLayout
             android:layout_width="match_parent"

+ 2 - 2
student/src/main/res/layout/layout_home_hot_album_item.xml

@@ -22,8 +22,8 @@
         android:background="@drawable/shape_home_album_tag_bg"
         android:gravity="center"
         android:includeFontPadding="false"
-        android:paddingStart="8dp"
-        android:paddingEnd="8dp"
+        android:paddingStart="6dp"
+        android:paddingEnd="6dp"
         tools:text="付费"
         android:textColor="@color/white"
         android:textSize="@dimen/sp_9" />

+ 4 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/main/HomeFragment.kt

@@ -436,6 +436,10 @@ class HomeFragment : BaseMVPFragment<FragmentHomeLayoutBinding, HomePresenter>()
         TODO("Not yet implemented")
     }
 
+    override fun getAwardStatus(awardStatusBean: AwardStatusBean?) {
+        TODO("Not yet implemented")
+    }
+
     /**
      * 跳转直播课详情页面
      *

+ 5 - 0
teacher/src/main/java/com/cooleshow/teacher/ui/main/MineFragment.java

@@ -82,6 +82,7 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
         mViewBinding.tvCourseComment.setOnClickListener(this);
         mViewBinding.llBadge.setOnClickListener(this);
         mViewBinding.tvContactUs.setOnClickListener(this);
+        mViewBinding.tvAward.setOnClickListener(this);
     }
 
     @Override
@@ -376,6 +377,10 @@ public class MineFragment extends BaseMVPFragment<FragmentMineLayoutBinding, Min
                 //联系我们
                 WebStartHelper.startContactUs();
                 break;
+            case R.id.tv_award:
+                //活动领奖
+                WebStartHelper.startAwardPage();
+                break;
         }
     }
 

二進制
teacher/src/main/res/drawable-xhdpi/icon_mine_award.png


二進制
teacher/src/main/res/drawable-xxhdpi/icon_mine_award.png


+ 17 - 0
teacher/src/main/res/layout/fragment_mine_layout.xml

@@ -748,6 +748,23 @@
             app:layout_constraintRight_toRightOf="@+id/tv_video_course"
             app:layout_constraintTop_toTopOf="@+id/tv_sparing_course_set" />
 
+        <TextView
+            android:id="@+id/tv_award"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:drawableTop="@drawable/icon_mine_award"
+            android:drawablePadding="@dimen/dp_3"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:minWidth="48dp"
+            android:text="活动奖品"
+            android:textColor="@color/color_333333"
+            android:textSize="@dimen/sp_13"
+            app:layout_constraintLeft_toLeftOf="@+id/tv_piano_course"
+            app:layout_constraintRight_toRightOf="@+id/tv_piano_course"
+            app:layout_constraintTop_toTopOf="@+id/tv_sparing_course_set" />
+
+
         <View
             android:id="@+id/bottom_view_line"
             android:layout_width="1px"