Commit b07b98a2 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent b17c8adc
......@@ -76,7 +76,9 @@ class BookReadActivity : BaseActivity(), View.OnClickListener, BookReadView {
}
R.id.btn_submit -> {
readyGo(VipActivity::class.java)
val bundle = Bundle()
bundle.putBoolean(VipActivity.IS_RECOMMEND, true)
readyGo(VipActivity::class.java, bundle)
}
}
}
......
......@@ -223,24 +223,24 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if (isPay) {
showToast("支付成功")
// if (isRecommend) {
// finish()
// } else {
// if (!UserManager.getInstance().userIsLogin()) {
// val b = Bundle()
// b.putString(MobileLoginActivity.TYPE, "vip")
// readyGoThenKill(MobileLoginActivity::class.java, b)
// } else {
// readyGoThenKill(MainActivity::class.java)
// }
// }
if (!UserManager.getInstance().userIsLogin()) {
val b = Bundle()
b.putString(MobileLoginActivity.TYPE, "vip")
readyGoThenKill(MobileLoginActivity::class.java, b)
if (isRecommend) {
finish()
} else {
readyGoThenKill(MainActivity::class.java)
if (!UserManager.getInstance().userIsLogin()) {
val b = Bundle()
b.putString(MobileLoginActivity.TYPE, "vip")
readyGoThenKill(MobileLoginActivity::class.java, b)
} else {
readyGoThenKill(MainActivity::class.java)
}
}
// if (!UserManager.getInstance().userIsLogin()) {
// val b = Bundle()
// b.putString(MobileLoginActivity.TYPE, "vip")
// readyGoThenKill(MobileLoginActivity::class.java, b)
// } else {
// readyGoThenKill(MainActivity::class.java)
// }
}
}
......
......@@ -32,7 +32,7 @@ import com.mints.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.fragment_main_bookcity.*
/**
* 账单
* 书城-2
*/
class BookCityFragment : LazyLoadBaseFragment(), BookCityView, View.OnClickListener {
......
......@@ -79,9 +79,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
}
R.id.tv_my_btn -> {
if (!userManager.vipFlag) {
readyGo(VipActivity::class.java)
}
readyGo(VipActivity::class.java)
}
R.id.ll_my_history -> {
readyGo(WatchRecordActivity::class.java)
......
......@@ -126,12 +126,12 @@
android:layout_margin="15dp"
android:background="@drawable/shape_bg_write"
android:elevation="2dp"
android:orientation="vertical"
android:padding="10dp">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_height="wrap_content"
android:padding="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
......
......@@ -2,13 +2,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:background="@drawable/shape_mine"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="20dp">
android:paddingTop="30dp">
<LinearLayout
android:id="@+id/view_search"
......@@ -38,7 +39,7 @@
<com.youth.banner.Banner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_height="190dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp" />
......@@ -48,12 +49,12 @@
android:layout_margin="15dp"
android:background="@drawable/shape_bg_write"
android:elevation="2dp"
android:orientation="vertical"
android:padding="10dp">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_height="wrap_content"
android:padding="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -90,15 +91,18 @@
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="15dp"
android:paddingBottom="6dp"
android:background="@drawable/shape_bg_write"
android:elevation="2dp"
android:orientation="vertical"
android:padding="10dp">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingTop="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:orientation="horizontal">
<TextView
......
<com.mints.enjoyboxjia.ui.widgets.ElasticScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@drawable/shape_mine"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="20dp">
android:paddingTop="30dp">
<LinearLayout
android:layout_width="match_parent"
......
......@@ -98,7 +98,7 @@
android:background="@mipmap/bg_my_vip"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingLeft="104dp">
android:paddingLeft="98dp">
<TextView
android:id="@+id/tv_my_vip"
......@@ -106,7 +106,7 @@
android:layout_height="wrap_content"
android:text="开通VIP会员"
android:textColor="#FFE5BA"
android:textSize="24sp"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
......@@ -114,7 +114,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textSize="16sp"
android:textSize="14sp"
android:text="万本小说免费看"
android:textColor="#ADABAA" />
......@@ -123,14 +123,14 @@
<Button
android:id="@+id/tv_my_btn"
android:layout_width="100dp"
android:layout_height="36dp"
android:layout_width="80dp"
android:layout_height="32dp"
android:layout_gravity="center_vertical|right"
android:layout_marginRight="10dp"
android:background="@drawable/shape_my"
android:text="立即开通"
android:textColor="#4F301D"
android:textSize="16sp"
android:textSize="14sp"
android:textStyle="bold" />
</FrameLayout>
......
......@@ -2,10 +2,13 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="178dp"
android:orientation="vertical"
android:paddingTop="6dp"
android:paddingBottom="6dp">
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:layout_marginTop="3dp"
android:paddingBottom="10dp"
android:orientation="vertical">
<ImageView
android:id="@+id/image_iv"
......@@ -23,6 +26,7 @@
android:layout_marginTop="4dp"
android:lines="2"
android:text="我去平行时空"
android:ellipsize="end"
android:textColor="@color/black"
android:textSize="13sp"
app:layout_constraintStart_toStartOf="@id/image_iv"
......@@ -33,7 +37,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:ellipsize="end"
android:maxLines="1"
android:text="重回80年代"
android:textColor="@color/gray"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="126dp"
android:layout_marginBottom="6dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:paddingLeft="6dp"
android:layout_marginTop="6dp"
android:paddingBottom="5dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/image_iv"
android:layout_width="90dp"
android:layout_height="126dp"
android:layout_width="80dp"
android:layout_height="110dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_launcher_main" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="126dp"
android:layout_height="116dp"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="10dp">
......@@ -24,7 +27,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:lines="2"
android:lines="1"
android:ellipsize="end"
android:text="我去平行时空"
android:textColor="@color/black"
android:textSize="14sp" />
......@@ -44,7 +48,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="12sp" />
......
......@@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="126dp"
android:layout_marginBottom="10dp"
android:paddingRight="4dp"
android:orientation="horizontal">
<ImageView
......@@ -25,8 +26,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:lines="2"
android:lines="1"
android:textStyle="bold"
android:ellipsize="end"
android:text="我去平行时空"
android:textColor="@color/black"
android:textSize="18sp" />
......@@ -35,8 +37,10 @@
android:id="@+id/info_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:lines="2"
android:layout_marginTop="6dp"
android:lines="3"
android:ellipsize="end"
android:minLines="3"
android:textColor="@color/gray"
android:textSize="16sp" />
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="126dp"
android:layout_marginBottom="6dp"
android:layout_height="wrap_content"
android:layout_margin="6dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/image_iv"
android:layout_width="0dp"
android:layout_height="126dp"
android:layout_weight="1"
android:layout_width="90dp"
android:layout_height="116dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_launcher_main" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="126dp"
android:layout_height="116dp"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="10dp">
android:paddingStart="4dp">
<TextView
android:id="@+id/title_tv"
......@@ -27,6 +26,7 @@
android:layout_marginTop="6dp"
android:lines="2"
android:text="我去平行时空"
android:ellipsize="end"
android:textColor="@color/black"
android:textSize="14sp" />
......@@ -37,6 +37,7 @@
android:layout_marginTop="10dp"
android:ellipsize="end"
android:lines="2"
android:minLines="2"
android:textColor="@color/gray"
android:textSize="12sp" />
......@@ -45,7 +46,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:maxLines="1"
android:textSize="12sp" />
......
......@@ -7,15 +7,17 @@
<TextView
android:id="@+id/item_tv"
android:layout_width="70dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="热闹"
android:gravity="center"
android:paddingTop="10dp"
android:paddingTop="8dp"
android:paddingLeft="18dp"
android:paddingRight="18dp"
android:background="@drawable/shape_book_text_none"
android:paddingBottom="10dp"
android:paddingBottom="8dp"
android:textColor="@color/color_8D8F90"
android:textSize="18sp"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
\ No newline at end of file
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