lmw
2023-06-13 adf8013576cbdd12e5ebea8ff7e32baf5d558b27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.kuanzhai.user.ui.mine
 
import androidx.fragment.app.Fragment
import com.kuanzhai.user.R
import com.kuanzhai.user.ui.TransparentStatusBarActivity
import kotlinx.android.synthetic.main.activity_my_coupon.*
 
class MyCouponActivity : TransparentStatusBarActivity() {
    override fun setContentView() = R.layout.activity_my_coupon
 
    private val isBusiness by lazy { intent.getBooleanExtra("isBusiness",false) }
 
    override fun initClick() {
    }
    private val fragments = arrayListOf<Fragment>()
    override fun initView() {
        title = "我的优惠券"
 
        fragments.add(CouponFragment())
        fragments.add(MyBusinessCouponFragment())
        tab_layout.setViewPager(view_pager, arrayOf("出行券","商家券"),this,fragments)
        if (isBusiness)
            view_pager.currentItem = 1
    }
}