Example of applying android:elevation on ImageView

Example of applying android:elevation on ImageView - Hello Friend GENERAL INFO FOR ANDROID DEVELOPMENT, In the article you read this time with the title Example of applying android:elevation on ImageView, We have prepared this article for you to read and retrieve information there in. Hopefully the contents of postings Artikel elevation, Artikel Material Design, We write this you can understand. Alright, good read.

The Title : Example of applying android:elevation on ImageView
link : Example of applying android:elevation on ImageView

Read also


Example of applying android:elevation on ImageView

Example to apply android:elevation on ImageView.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:orientation="vertical"
tools:context="com.blogspot.android_er.androidzelevation.MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_gravity="center_horizontal"
android:autoLink="web"
android:text="http://android-er.blogspot.com/"
android:textStyle="bold"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:elevation="20dp"
android:src="@mipmap/ic_launcher"/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="20dp"
android:background="@android:color/background_dark"
android:src="@mipmap/ic_launcher"/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="20dp"
android:background="#FF0000"
android:src="@mipmap/ic_launcher"/>
</LinearLayout>

</LinearLayout>


Running on ASUS Zenfone 2 running Android 5.0


How it shown on Emulator running Android API 23 and API 19, and also Android Studio Design View:




Thus Article Example of applying android:elevation on ImageView

The End Article Example of applying android:elevation on ImageView This time, hopefully can give benefits to all of you. well, see you in posting other articles.

You are now reading the article Example of applying android:elevation on ImageView with the link address http://xorislogo.blogspot.com/2016/07/example-of-applying-androidelevation-on.html

0 Response to "Example of applying android:elevation on ImageView"

Post a Comment