Commit accced25 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 66c6cada
......@@ -10,8 +10,8 @@ android {
applicationId "com.duben.xixiplaylet"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 22
versionName "2.0.1"
versionCode 23
versionName "2.0.2"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -331,8 +331,9 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
override fun getSoltVedioSuc(data: IndexList?) {
AppPreferencesManager.get().put(Constant.IS_FIRST_VEDIO, true)
if (data != null && data.vedioMsg != null) {
val firstVedio = AppPreferencesManager.get().getBoolean(Constant.IS_FIRST_VEDIO, true)
if (data != null && data.vedioMsg != null && firstVedio) {
AppPreferencesManager.get().put(Constant.IS_FIRST_VEDIO, false)
LocalVedioManager.startVedioDetailActivityForType(requireActivity(), data.vedioMsg)
} else {
if (UserManager.getInstance().newFlag && !UserManager.getInstance().vipFlag) {
......
......@@ -91,12 +91,12 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
vipBtn.visibility = View.GONE
adBtn.visibility = View.VISIBLE
holder.getView<TextView>(R.id.tv_title).text =
if (AppConfig.firstVipPrice == 0.0) "解锁后续剧集" else "${AppConfig.firstVipPrice}元解锁后续剧集1"
if (AppConfig.firstVipPrice == 0.0) "解锁后续剧集" else "${AppConfig.firstVipPrice}元解锁后续剧集"
} else { // 开通会员解锁
adBtn.visibility = View.GONE
vipBtn.visibility = View.VISIBLE
holder.getView<TextView>(R.id.tv_title).text =
if (AppConfig.firstVipPrice == 0.0) "解锁后续剧集" else "${AppConfig.firstVipPrice}元解锁后续剧集2"
if (AppConfig.firstVipPrice == 0.0) "解锁后续剧集" else "${AppConfig.firstVipPrice}元解锁后续剧集"
}
} else {
......@@ -104,7 +104,7 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
adBtn.visibility = View.GONE
vipBtn.visibility = View.VISIBLE
holder.getView<TextView>(R.id.tv_title).text =
if (AppConfig.firstVipPrice == 0.0) "解锁后续剧集" else "${AppConfig.firstVipPrice}元解锁后续剧集3"
if (AppConfig.firstVipPrice == 0.0) "解锁后续剧集" else "${AppConfig.firstVipPrice}元解锁后续剧集"
}
holder.getView<TextView>(R.id.unlock).text = String.format("查看激励视频")
......
......@@ -179,7 +179,6 @@
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:background="@drawable/shape_bg_write"
android:gravity="center"
android:orientation="vertical">
......@@ -189,37 +188,54 @@
android:layout_height="wrap_content"
android:background="@drawable/shape_bg_write" />
<TextView
android:id="@+id/tv_title"
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/bg_detail_top2"
android:layout_gravity="center_horizontal"></FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:background="@mipmap/bg_detail_center"
android:layout_gravity="center">
<TextView
android:layout_marginTop="10dp"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="试看已结束"
android:layout_gravity="center"
android:textColor="@color/color_815136"
android:textSize="22sp"
android:textStyle="bold" />
</FrameLayout>
<Button
android:id="@+id/vip"
android:layout_width="280dp"
android:layout_height="46dp"
android:layout_marginTop="20dp"
android:visibility="gone"
android:layout_marginBottom="10dp"
android:text="试看已结束"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />
android:background="@mipmap/bg_detail_bottom"
android:textColor="@color/white"
/>
<Button
android:id="@+id/unlock"
android:layout_width="230dp"
android:layout_height="40dp"
android:layout_width="280dp"
android:layout_height="46dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:background="@mipmap/bg_detail_top"
android:paddingStart="30dp"
android:text="看广告解锁1集"
android:textColor="@color/color_815136" />
<Button
android:id="@+id/vip"
android:layout_width="230dp"
android:layout_height="40dp"
android:layout_marginBottom="10dp"
android:background="@mipmap/bg_detail_bottom"
android:textColor="@color/white"
android:visibility="gone" />
</LinearLayout>
</FrameLayout>
......
......@@ -34,33 +34,38 @@
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@mipmap/bg_detail_center"
android:layout_gravity="center">
<TextView
android:layout_marginTop="10dp"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="试看已结束"
android:layout_gravity="center"
android:textColor="@color/color_815136"
android:textSize="20sp"
android:textSize="22sp"
android:textStyle="bold" />
</FrameLayout>
<Button
android:id="@+id/vip"
android:layout_width="240dp"
android:layout_height="56dp"
android:layout_width="280dp"
android:layout_height="46dp"
android:layout_marginTop="20dp"
android:visibility="gone"
android:layout_marginBottom="10dp"
android:background="@mipmap/bg_detail_bottom"
android:textColor="@color/white"
android:visibility="gone" />
/>
<Button
android:id="@+id/unlock"
android:layout_width="230dp"
android:layout_height="40dp"
android:layout_width="280dp"
android:layout_height="46dp"
android:layout_marginBottom="10dp"
android:background="@mipmap/bg_detail_top"
android:paddingStart="30dp"
......
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