Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SampleActivityUI : AnkoComponent<SampleActivity> {
- override fun createView(ui: AnkoContext<SampleActivity>): View = with(ui) {
- relativeLayout {
- id = R.id.container
- /* Ankoでのレイアウト実装 */
- // val textView = textView {
- // textSize = 18F
- // }.lparams {
- // centerHorizontally()
- // topMargin = dip(20)
- // }
- //
- // // SeekBarの実装
- // seekBar {
- // progress = 5 // 初期値
- // max = 10 // 最大値
- //
- // // 操作イベントの実装
- // onSeekBarChangeListener {
- //
- // // 値が変更されたら呼ばれる
- // onProgressChanged { seekBar, i, b ->
- // textView.text = i.toString()
- // }
- // }
- // }.lparams(matchParent, wrapContent) {
- // centerInParent()
- // }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement