Last active
April 19, 2018 02:39
-
-
Save xloger/0b71085abcf43fb5c4817fa34c728990 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
val view = inflater.inflate(R.layout.fragment_mine, container, false) | |
view.mine_recycler_view.adapter = SimpleAdapter<MineActionItem>(mineActionItem,R.layout.item_mine) { holder, item -> | |
holder.itemView.item_mine_icon.imageResource = item.icon | |
holder.itemView.item_mine_title.text = item.name | |
holder.itemView.item_mine_tip.text = item.info | |
holder.itemView.setOnClickListener { | |
toast("$item 被点击了") | |
} | |
} | |
view.mine_recycler_view.layoutManager = LinearLayoutManager(context) | |
return view | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment