0% found this document useful (0 votes)
6 views4 pages

Layout MAD

The document contains XML layout definitions for an Android application. It includes two layouts: one using AbsoluteLayout with a centered TextView and another using LinearLayout with multiple buttons and TextViews. The layouts are designed for a MainActivity and incorporate various UI elements with specified attributes such as text size, color, and visibility.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Layout MAD

The document contains XML layout definitions for an Android application. It includes two layouts: one using AbsoluteLayout with a centered TextView and another using LinearLayout with multiple buttons and TextViews. The layouts are designed for a MainActivity and incorporate various UI elements with specified attributes such as text size, color, and visibility.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

<?xml version="1.0" encoding="utf-8"?

>
<AbsoluteLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<TextView
android:id="@+id/t2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_x="29dp"
android:layout_y="234dp"
android:background="@color/design_default_color_error"
android:text="Abhishek"
android:textColor="@color/material_dynamic_tertiary60"
android:textSize="50sp" />

</AbsoluteLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/t2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PWP"
android:textSize="50sp"
android:background="@color/design_default_color_error"
android:textColor="@color/material_dynamic_tertiary60"
android:layout_gravity="center"
android:visibility="gone"/>

<Button
android:id="@+id/button1"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="MAD" />

<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="WBP" />

<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="PWP" />
<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="MGT" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>

<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:text="MAD" />

<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="WBP" />

<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="PWP" />

<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="MGT" />
</LinearLayout>

</LinearLayout>

You might also like