Created
April 29, 2016 07:57
-
-
Save Sefford/20a2a0d81301eb06aee5be50bc49afbb 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
<!-- For XML --> | |
<View | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:elevation="@dimen/elevation_level_3"> | |
<!-- Elevation is ignored in XMLs pre-Lollipop, but remember | |
that in those versions, to preserve Z-axis order in | |
layouts, Android handles it on a strict top-bottom | |
ordering (the lower, the higher) --> | |
// Code example | |
// Does nothing for pre-Lollipop and ViewCompat requires Android Support Library. | |
ViewCompat.setElevation(view, getResources().getDimensionPixelSize(R.dimen.elevation_dimen)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment