Created
October 30, 2016 17:42
-
-
Save nomisRev/565034c29aaace0c1a0fcd98adf5ae62 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
configuration(orientation = Orientation.LANDSCAPE, smallestWidth = 700) { | |
recyclerView { | |
init() | |
}.lparams(width = widthProcent(50), height = matchParent) | |
frameLayout().lparams(width = matchParent, height = matchParent) | |
} | |
fun <T : View> T.widthProcent(procent: Int): Int = | |
getAppUseableScreenSize().x.toFloat().times(procent.toFloat() / 100).toInt() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you mean "percent" in place of "procent" everywhere in this file?