| | |
| | | import com.sinata.xqmuse.ui.course.adapter.ChapterAdapter |
| | | import com.sinata.xqmuse.ui.course.adapter.CourseGridAdapter |
| | | import com.sinata.xqmuse.utils.AppBarStateChangeListener |
| | | import com.sinata.xqmuse.utils.Const |
| | | import com.sinata.xqmuse.utils.interfaces.StringCallback |
| | | import com.umeng.socialize.bean.SHARE_MEDIA |
| | | import kotlinx.android.synthetic.main.activity_course_deatil.* |
| | |
| | | override fun onResult(rst: String) { |
| | | if (rst == "wx"){ |
| | | ShareUtils.share(this@CourseDetailActivity, |
| | | SHARE_MEDIA.WEIXIN,data?.courseTitle,"分享你一个课程", |
| | | SHARE_MEDIA.WEIXIN,data?.courseTitle, Const.SHARE.SHARE_COURSE_TITLE, |
| | | Apis.SHARE_COURSE.format(data?.id),null,"") |
| | | }else{ |
| | | ShareUtils.share(this@CourseDetailActivity, |
| | | SHARE_MEDIA.WEIXIN_CIRCLE,data?.courseTitle,"分享你一个课程", |
| | | SHARE_MEDIA.WEIXIN_CIRCLE,data?.courseTitle,Const.SHARE.SHARE_COURSE_TITLE, |
| | | Apis.SHARE_COURSE.format(data?.id),null,"") |
| | | } |
| | | } |
| | |
| | | State.EXPANDED -> { |
| | | //展开状态 |
| | | iv_back.imageResource = R.mipmap.icon_back_white |
| | | iv_share.imageResource = R.mipmap.ic_share |
| | | if (data?.isCollect!=1) |
| | | iv_collect.imageResource = R.mipmap.uncollect |
| | | tvTitle.textColorResource = R.color.white |
| | | } |
| | | State.COLLAPSED -> { |
| | | //折叠状态 |
| | | iv_back.imageResource = R.mipmap.back |
| | | iv_share.imageResource = R.mipmap.ic_share_black |
| | | if (data?.isCollect!=1) |
| | | iv_collect.imageResource = R.mipmap.uncollect_b |
| | | tvTitle.textColorResource = R.color.textColor |
| | | } |
| | | } |