Layout Design[UI Design]

Each UI layout file must contain exactly one root element like textview or or edittext or button, which must be a View or ViewGroup object. Once we defined the root element, we can add additional layout objects or widgets as child elements to gradually build a View hierarchy that defines our layout.

Est in saepe accusam luptatum. Purto deleniti philosophia eum ea, impetus copiosae id mel. Vis at ignota delenit democritum, te summo tamquam delicata pro. Utinam concludaturque et vim, mei ullum intellegam ei. Eam te illum nostrud, suas sonet corrumpit ea per. Ut sea regione posidonium. Pertinax gubergren ne qui, eos an harum mundi quaestio.

R.layout.single_item

Nihil persius id est, iisque tincidunt abhorreant no duo. Eripuit placerat mnesarchum ius at, ei pro laoreet invenire persecuti, per magna tibique scriptorem an. Aeque oportere incorrupte ius ea, utroque erroribus mel in, posse dolore nam in. Per veniam vulputate intellegam et, id usu case reprimique, ne aperiam scaevola sed. Veritus omnesque qui ad. In mei admodum maiorum iracundia, no omnis melius eum, ei erat vivendo his. In pri nonumes suscipit.

Android Development and IOS Development & React Native Application Et veri nostrud vix, meis minimum atomorum ex sea, stet case habemus mea no. Ut dignissim dissentiet his, mei ea delectus delicatissimi, debet dissentiunt te duo. Sonet partiendo et qui, pro et veri solet singulis. Vidit viderer eleifend ad nam. Minimum eligendi suscipit ius et, vis ex laoreet detracto scripserit, at sumo sale solum pro.

MainActivity[MainActivity.class]

	
	package com.androidfeeders.relativelayout;
	
	import android.support.v7.app.AppCompatActivity;
	import android.os.Bundle;
	
	
	/**
	* Created by ramasamy on 29/07/2018.
	*/
	
	
	
	public class RelativeLayoutSample extends AppCompatActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.relative_layout_sample);
	}
	}
	
	

Layout Resource[relative_layout_sample.xml]

	
	<?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:layout_width="match_parent"
	android:gravity="center"
	android:layout_height="match_parent"
	tools:context=".RelativeLayoutSample">
	
	<TextView
	android:id="@+id/text_view_1"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:text="Text1"
	/>
	
	<TextView
	android:id="@+id/text_view_2"
	android:layout_width="wrap_content"
	android:layout_below="@+id/text_view_1"
	android:layout_height="wrap_content"
	android:text="Text2"
	/>
	
	</RelativeLayout>
	
	
	
	

Gradle Scripts~build.gradle[Module:app]

apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.androidfeeders.relativelayout" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0-beta01' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' }

Gradle Scripts~build.gradle[Project:RelativeLayout]

	
	// Top-level build file where you can add configuration options common to all sub-projects/modules.
	
	buildscript {
	
	repositories {
	google()
	jcenter()
	}
	dependencies {
	classpath 'com.android.tools.build:gradle:3.1.1'
	
	
	// NOTE: Do not place your application dependencies here; they belong
	// in the individual module build.gradle files
	}
	}
	
	allprojects {
	repositories {
	google()
	jcenter()
	}
	}
	
	task clean(type: Delete) {
	delete rootProject.buildDir
	}
	
	
	
	
	

Resource[strings.xml]

	
	<resources>
	<string name="app_name">RelativeLayout</string>
	</resources>
	
	
	
	

manifests

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidfeeders.relativelayout"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".RelativeLayoutSample"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

Ramasamy

I started to learn android and Kotlin and iOS and Hybrid application and i cant code IOS very well. But i love more interesting to code and finding new developer minds who are join to me You're welcome to keep on using my website.Instead, you can join our FB page for developer comments and post there: https://www.facebook.com/ramasamy.m.779 Best wishes :) Ramasamy(Software Developer)

Android Development and IOS Development & React Native Application

See what's new in Android & IOS & Hybrid development … explore and learn in site

About Ramasamy

Kotlin and React native example too

Related Posts

3 Comments

Ramasamy

5 min ago

Kotlin and React native example too

Reply

Ramasamy

5 min ago

Kotlin and React native example too

Reply

Ramasamy

5 min ago

Kotlin and React native example too

Reply

Leave a reply