@@ -2,11 +2,11 @@ package com.luojilab.share.kotlin
22
33import android.app.Activity
44import android.os.Bundle
5- import android.widget.TextView
65import com.luojilab.component.componentlib.service.AutowiredService
76import com.luojilab.componentservice.share.bean.Author
87import com.luojilab.router.facade.annotation.Autowired
98import com.luojilab.router.facade.annotation.RouteNode
9+ import kotlinx.android.synthetic.main.kotlin_activity_share.*
1010
1111/* *
1212 * Created by mrzhang on 2017/12/29.
@@ -22,26 +22,15 @@ class ShareMessageActivity : Activity() {
2222 @JvmField
2323 var author: Author ? = null
2424
25- var tvShareTitle: TextView ? = null
26- var tvShareBook: TextView ? = null
27- var tvAuthor: TextView ? = null
28- var tvCounty: TextView ? = null
29-
3025 override fun onCreate (savedInstanceState : Bundle ? ) {
3126 super .onCreate(savedInstanceState)
3227 AutowiredService .Factory .getInstance().create().autowire(this )
3328 setContentView(R .layout.kotlin_activity_share)
3429
35- tvShareTitle = findViewById<TextView >(R .id.share_title)
36- tvShareBook = findViewById<TextView >(R .id.share_tv_tag)
37- tvAuthor = findViewById<TextView >(R .id.share_tv_author)
38- tvCounty = findViewById<TextView >(R .id.share_tv_county)
39-
40-
41- tvShareTitle?.text = " Magazine"
42- tvShareBook?.setText(magazineName)
43- tvAuthor?.setText(author?.name ? : " zmq" )
44- tvCounty!! .setText(author?.county ? : " China" )
30+ share_title.text = " Magazine"
31+ share_tv_tag.setText(magazineName)
32+ share_tv_author.setText(author?.name ? : " zmq" )
33+ share_tv_county.setText(author?.county ? : " China" )
4534
4635 }
4736
0 commit comments