android:gravity vs android:layout_gravity

android:gravity vs android:layout_gravity - Hello Friend GENERAL INFO FOR ANDROID DEVELOPMENT, In the article you read this time with the title android:gravity vs android:layout_gravity, We have prepared this article for you to read and retrieve information there in. Hopefully the contents of postings Artikel Android code sample: Layout, We write this you can understand. Alright, good read.

The Title : android:gravity vs android:layout_gravity
link : android:gravity vs android:layout_gravity

Read also


android:gravity vs android:layout_gravity


This simple example show how android:gravity and android:layout_gravity affect the placement.


<?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.androidgravity.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="match_parent"
android:layout_margin="10dp"
android:background="#D00000">
<TextView
android:layout_width="match_parent"
android:layout_height="200sp"
android:layout_margin="10dp"
android:gravity="center"
android:layout_gravity="center"

android:background="#0000C0"
android:textSize="28sp"
android:textStyle="bold"
android:text="android-er"/>
</LinearLayout>
</LinearLayout>




Thus Article android:gravity vs android:layout_gravity

The End Article android:gravity vs android:layout_gravity This time, hopefully can give benefits to all of you. well, see you in posting other articles.

You are now reading the article android:gravity vs android:layout_gravity with the link address http://xorislogo.blogspot.com/2016/07/androidgravity-vs-androidlayoutgravity.html

0 Response to "android:gravity vs android:layout_gravity"

Post a Comment