Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. class SampleActivityUI : AnkoComponent<SampleActivity> {
  2.  
  3. override fun createView(ui: AnkoContext<SampleActivity>): View = with(ui) {
  4. relativeLayout {
  5. id = R.id.container
  6.  
  7. /* Ankoでのレイアウト実装 */
  8. // val textView = textView {
  9. // textSize = 18F
  10. // }.lparams {
  11. // centerHorizontally()
  12. // topMargin = dip(20)
  13. // }
  14. //
  15. // // SeekBarの実装
  16. // seekBar {
  17. // progress = 5 // 初期値
  18. // max = 10 // 最大値
  19. //
  20. // // 操作イベントの実装
  21. // onSeekBarChangeListener {
  22. //
  23. // // 値が変更されたら呼ばれる
  24. // onProgressChanged { seekBar, i, b ->
  25. // textView.text = i.toString()
  26. // }
  27. // }
  28. // }.lparams(matchParent, wrapContent) {
  29. // centerInParent()
  30. // }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement