Commit b9a81a16 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent bfb86a41
......@@ -137,6 +137,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
TrackManager.getInstance().getMyInfo()
// showRecommendAct()
}
AppConfig.showVipAdDialog=false
}
}
......
......@@ -7,6 +7,7 @@ import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView
import com.duben.xixiplaylet.R
......@@ -21,7 +22,7 @@ class DetailAdDialog(private val context: Context, private val listener: DialogL
context, R.style.dialog
) {
private val lp: WindowManager.LayoutParams
private val iv_detail_ad_next: ImageView
private val iv_detail_ad_next: Button
private val tv_detail_ad_unlocktext: TextView
init {
......@@ -43,7 +44,10 @@ class DetailAdDialog(private val context: Context, private val listener: DialogL
}
// 查找View
iv_detail_ad_next = findViewById<View>(R.id.iv_detail_ad_next) as ImageView
iv_detail_ad_next = findViewById<View>(R.id.tv_detail_ad_next) as Button
findViewById<View>(R.id.iv_detail_quit).setOnClickListener {
dismiss()
}
tv_detail_ad_unlocktext = findViewById<View>(R.id.tv_detail_ad_unlocktext) as TextView
tv_detail_ad_unlocktext.text = AppConfig.detailDialogUnlockText
......
......@@ -7,60 +7,52 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/shape_bg_write"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:gravity="center"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@mipmap/bg_detail_top2"></FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:background="@mipmap/bg_detail_center">
<TextView
android:id="@+id/tv_detail_ad_unlocktext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="试用订阅规则说明"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"></TextView>
android:gravity="center"
android:text="试看已结束"
android:textColor="@color/color_815136"
android:textSize="14sp" />
</FrameLayout>
<ImageView
android:id="@+id/iv_detail_ad_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingTop="10dp"
android:paddingRight="20dp"
android:src="@mipmap/ic_activity_quit"></ImageView>
</RelativeLayout>
<TextView
<Button
android:id="@+id/tv_detail_ad_next"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="10dp"
android:layout_marginRight="40dp"
android:layout_width="280dp"
android:layout_height="46dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_rule_gary"
android:gravity="center"
android:text=""
android:enabled="false"
android:textColor="@color/white"
android:textSize="18sp" />
android:background="@mipmap/bg_detail_lock"
android:textColor="@color/color_815136" />
<TextView
<ImageView
android:id="@+id/iv_detail_quit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:gravity="center"
android:text="会员到期后自动续费,可随时取消;订阅管理,可前往会员付费界面最下方进行相关操作"
android:textColor="@color/black"
android:textSize="13sp"></TextView>
android:padding="5dp"
android:src="@mipmap/ic_activity_quit"></ImageView>
</LinearLayout>
</RelativeLayout>
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