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
26
27
28
29
30
31
32
33
34
35
36
37
package com.kuanzhai.user.ui.trip
 
import androidx.recyclerview.widget.LinearLayoutManager
import com.kuanzhai.user.R
import com.kuanzhai.user.network.entity.CarPrice
import com.kuanzhai.user.network.entity.Rule
import com.kuanzhai.user.ui.TransparentStatusBarActivity
import com.kuanzhai.user.ui.trip.adapter.RuleAdapter
import kotlinx.android.synthetic.main.activity_pin_price_rule.*
 
class PinPriceRuleActivity : TransparentStatusBarActivity() {
    override fun setContentView() = R.layout.activity_pin_price_rule
 
    private val rule by lazy {
        intent.getParcelableExtra<CarPrice>("rule")
    }
    private val describe by lazy { intent.getStringExtra("describe") }
 
    private val rules = arrayListOf<Rule>()
    private val adapter = RuleAdapter(rules)
 
    override fun initClick() {
    }
 
    override fun initView() {
        title = "计价规则"
        rv_price.layoutManager = LinearLayoutManager(this)
        rules.add(rule.contentPutOne)
        rules.add(rule.contentNotOne)
        rules.add(rule.contentPutTwo)
        rules.add(rule.contentNotTwo)
        rules.add(rule.contentPutThree)
        rules.add(rule.contentNotThree)
        rv_price.adapter = adapter
        tv_content.text = describe
    }
}