This file contains hidden or 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
l[LinearLayout]( | |
w[TextView] ~> text("Howdy?") ~> TextSize.large ~> | |
// this will automatically use LinearLayout.LayoutParams | |
layoutParams(MATCH_PARENT, WRAP_CONTENT), | |
w[ImageView] ~> hide ~> { x ⇒ | |
// custom initialization | |
x.setScaleType(ImageView.ScaleType.FIT_START) | |
x.setAdjustViewBounds(true) | |
} |
This file contains hidden or 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
l[ScrollView]( | |
l[LinearLayout]( | |
w[TextView], | |
w[Button], | |
l[LinearLayout]( | |
w[ImageView], | |
w[ImageView] | |
), | |
// this will use ProgressBar(context, attrs, defStyle); context is passed for you automatically! | |
w[ProgressBar](null, android.R.attr.progressBarStyleLarge) |
This file contains hidden or 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
/* Basic example */ | |
@workflow[List] val x = List(1, 2) * List(4, 5) | |
/* Using @context */ | |
@context[Option] val x = { | |
$(Some(42) + 1) should equal (Some(43)) | |
$(Some(10) + Some(5) * Some(2)) should equal (Some(20)) | |
} | |
@context[List] val x = { |
NewerOlder