Commit b447274c by 严久程

课程列表页促销标签

parent 9f6ab835
......@@ -2,11 +2,13 @@
package com.ydl.component.base;
import android.content.Context;
import com.ydl.component.BuildConfig;
import com.ydl.ydlcommon.base.config.GlobalConfig;
import com.ydl.ydlcommon.base.config.IConfigModule;
import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.base.delegate.IAppLifecycles;
import com.ydl.ydlcommon.base.config.GlobalConfig;
import org.jetbrains.annotations.NotNull;
import java.util.List;
......@@ -25,9 +27,9 @@ public final class DemoGlobalConfig implements IConfigModule {
@Override
public void applyOptions(@NotNull Context context, @NotNull GlobalConfig.Builder builder) {
builder.setFrom( "ydl".equals(BuildConfig.FLAVOR) ?YDLConstants.FROM_YDL :YDLConstants.FROM_XLZX)
builder.setFrom("ydl".equals(BuildConfig.FLAVOR) ? YDLConstants.FROM_YDL : YDLConstants.FROM_XLZX)
.addUrl("github", APP_DOMAIN)
.setEnv(YDLConstants.ENV_PROD)
.setEnv(YDLConstants.ENV_TEST)
.setDebug(BuildConfig.DEBUG);
}
}
......@@ -102,6 +102,9 @@ public class Course {
*/
public boolean isBuy = false;
public boolean joinActivity = false;
public String activityImg;
public CourseHostInfoBean courseHostInfo;
}
\ No newline at end of file
......@@ -76,11 +76,11 @@ class CourseItemNewView : ConstraintLayout {
.into(iv_head)
//活动标签
if(!TextUtils.isEmpty(course.courseHostInfo?.activityImg)){
if (course.joinActivity && !TextUtils.isEmpty(course.activityImg)) {
img_activity.visibility = View.VISIBLE
GlideApp.with(context).load(course.courseHostInfo?.activityImg).into(img_activity)
tv_title.text = "\u3000\u3000\u3000\u0020"+course.title
}else{
GlideApp.with(context).load(course.activityImg).into(img_activity)
tv_title.text = "\u3000\u3000\u3000\u0020" + course.title
} else {
img_activity.visibility = View.GONE
tv_title.text = course.title
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment