<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
" />
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
" />
activity_main.xml
==================
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.sam.web.relativelayout.MainActivity">
<Button
android:layout_centerInParent="true"
android:id="@+id/button1Id"
android:text="button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_alignBaseline="@id/button1Id"
android:layout_toRightOf="@id/button1Id"
android:textStyle="bold"
android:textSize="20sp"
android:id="@+id/imageViewID"
android:text="Hellow"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
=====================================================================
MainActivity.java
========================
package com.sam.web.relativelayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
thistimebd Bangladesh Live online newsportal, education, Lifestyle, Health, Photography, gif image etc.
Make your own name or company name website | contact: thistimebd24@gmail.com
Copyright © 2020-2024 News Portal in Bangladesh - THISTIMEBD.COM. ALL Rights Reserved.