Created
December 23, 2016 07:03
-
-
Save talhahasanzia/91fabe48c9bf74ef11ac1ba3dd899985 to your computer and use it in GitHub Desktop.
Materia Design surface. Reference: https://material.io/guidelines/material-design/elevation-shadows.html#objects-in-3d-space-elevation
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_main" | |
android:clipToPadding="false" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center" | |
tools:context="com.mujadidia.materialdesigncourse.MainActivity"> | |
<FrameLayout | |
android:layout_width="300dp" | |
android:layout_height="200dp" | |
android:background="@color/colorPrimary" | |
android:outlineProvider="bounds" | |
android:elevation="16dp"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Hello World!" | |
android:layout_gravity="center" | |
style="@style/MyStyle"/> | |
</FrameLayout> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment