Created
October 11, 2018 16:25
-
-
Save tcw165/7babe0743d783b2f668a8c27fe4221c9 to your computer and use it in GitHub Desktop.
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
| fun getOrientation(attrs: AttributeSet?): Int { | |
| val b = context.theme.obtainStyledAttributes( | |
| attrs, | |
| intArrayOf(android.R.attr.orientation), 0, 0) | |
| val orientation = b.getInt(0, RecyclerView.VERTICAL) | |
| b.recycle() | |
| return orientation | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment