Last active
May 19, 2019 15:25
-
-
Save hirauchg/37ff778049e92df7a9f838a73103d3f0 to your computer and use it in GitHub Desktop.
RecyclerViewでリスト表示を実装する - リスト表示画面の実装 - 2
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
class SampleActivityUI : AnkoComponent<SampleActivity> { | |
lateinit var mRecyclerView: RecyclerView | |
override fun createView(ui: AnkoContext<SampleActivity>) = with(ui) { | |
verticalLayout { | |
mRecyclerView = recyclerView { | |
layoutManager = LinearLayoutManager(ctx, LinearLayoutManager.VERTICAL, false) | |
}.lparams(width = matchParent) { | |
topMargin = dip(5) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment