Commit 814d6ab3 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent d8a48f2a
...@@ -97,7 +97,7 @@ object LocalVedioManager { ...@@ -97,7 +97,7 @@ object LocalVedioManager {
private fun requestDrama(activity: Activity, data: VedioBean?) { private fun requestDrama(activity: Activity, data: VedioBean?) {
if (DPSdk.isStartSuccess() && data != null) { if (DPSdk.isStartSuccess() && data != null) {
DPSdk.factory().requestDrama( DPSdk.factory().requestDrama(
arrayListOf(data.vedioId.toLong()), object : IDPWidgetFactory.DramaCallback { arrayListOf(data.thirdId.toLong()), object : IDPWidgetFactory.DramaCallback {
override fun onError(p0: Int, p1: String?) { override fun onError(p0: Int, p1: String?) {
ToastUtil.show(activity, "网络错误!") ToastUtil.show(activity, "网络错误!")
} }
......
...@@ -239,7 +239,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -239,7 +239,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
bannerList.clear() bannerList.clear()
for (i in 0 until data.list.size) { for (i in 0 until data.list.size) {
val bean = BannerBean() val bean = BannerBean()
bean.title = data.list.get(i).title bean.title = data.list.get(i).topTabsReamrk
bean.imageRes = data.list.get(i).coverImage bean.imageRes = data.list.get(i).coverImage
bannerList.add(bean) bannerList.add(bean)
} }
......
...@@ -32,6 +32,15 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener { ...@@ -32,6 +32,15 @@ class MyFragment : BaseFragment(), MyView, View.OnClickListener {
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
myPresenter.attachView(this) myPresenter.attachView(this)
tv_contact.text = SpanUtils()
.append("如有问题,请直接联系")
.append("在线客服\n")
.setForegroundColor(resources.getColor(R.color.main_mints))
.append("处理速度更快,")
.append("无需联系支付宝")
.setForegroundColor(resources.getColor(R.color.main_mints))
.create()
initListener() initListener()
} }
......
...@@ -88,6 +88,7 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView, ...@@ -88,6 +88,7 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
} }
fm_bottom.setOnClickListener(this) fm_bottom.setOnClickListener(this)
close_iv.setOnClickListener(this)
val recyViewLayoutManager = RecyViewLayoutManager(this, OrientationHelper.VERTICAL) val recyViewLayoutManager = RecyViewLayoutManager(this, OrientationHelper.VERTICAL)
recy.layoutManager = recyViewLayoutManager recy.layoutManager = recyViewLayoutManager
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/black" android:background="@color/black"
android:orientation="vertical" android:orientation="vertical"
tools:context=".video.VideoActivity">r tools:context=".video.VideoActivity">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy" android:id="@+id/recy"
......
...@@ -144,39 +144,38 @@ ...@@ -144,39 +144,38 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="30dp"
android:text="试看已结束" android:text="试看已结束"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" /> android:textSize="16sp" />
<Button <Button
android:id="@+id/unlock" android:id="@+id/unlock"
android:layout_width="280dp" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="20dp"
android:background="@drawable/shape_red" android:background="@mipmap/bg_detail_top"
android:text="看广告解锁1集" android:text="看广告解锁1集"
android:textColor="@color/white" /> android:textColor="@color/white" />
<Button <Button
android:id="@+id/vip" android:id="@+id/vip"
android:layout_width="280dp" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_height="wrap_content"
android:background="@drawable/shape_green" android:background="@mipmap/bg_detail_bottom"
android:text="开通会员"
android:textColor="@color/white" /> android:textColor="@color/white" />
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/leave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:padding="10dp"
android:src="@mipmap/ic_arrow_white" />
</FrameLayout> </FrameLayout>
<ImageView
android:id="@+id/leave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:padding="10dp"
android:src="@mipmap/ic_arrow_white" />
</FrameLayout> </FrameLayout>
\ No newline at end of file
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toTopOf="@id/info_tv" app:layout_constraintBottom_toTopOf="@id/info_tv"
app:layout_constraintLeft_toLeftOf="parent"> app:layout_constraintLeft_toLeftOf="parent">
...@@ -40,7 +41,8 @@ ...@@ -40,7 +41,8 @@
<TextView <TextView
android:id="@+id/info_tv" android:id="@+id/info_tv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="50dp" android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center|left" android:gravity="center|left"
......
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