0% found this document useful (0 votes)
4 views2 pages

Project 2 XML

The document is an XML layout file for an Android application using ConstraintLayout. It defines a user interface with a TextView for the title 'Create Your Player' and four buttons labeled 'Bomber', 'Fighter', and two 'fire' buttons, each with associated click actions. The layout is designed to be responsive and adapt to different screen sizes.

Uploaded by

A A Mamun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Project 2 XML

The document is an XML layout file for an Android application using ConstraintLayout. It defines a user interface with a TextView for the title 'Create Your Player' and four buttons labeled 'Bomber', 'Fighter', and two 'fire' buttons, each with associated click actions. The layout is designed to be responsive and adapt to different screen sizes.

Uploaded by

A A Mamun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

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

>
<androidx.constraintlayout.widget.ConstraintLayout
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=".MainActivity">

<TextView
android:id="@+id/textView"
android:layout_width="262dp"
android:layout_height="39dp"
android:text="Create Your Player"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.684"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.076" />

<Button
android:id="@+id/button"
android:layout_width="154dp"
android:layout_height="71dp"
android:onClick="bomber"
android:text="Bomber"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.062"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.253" />

<Button
android:id="@+id/button2"
android:layout_width="154dp"
android:layout_height="71dp"
android:onClick="fighter"
android:text="Fighter"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.937"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.253" />

<Button
android:id="@+id/button3"
android:layout_width="154dp"
android:layout_height="71dp"
android:onClick="fire_bomb"
android:text="fire"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.062"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.431" />

<Button
android:id="@+id/button4"
android:layout_width="154dp"
android:layout_height="71dp"
android:onClick="fire_fight"
android:text="fire"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.937"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.431" />
</androidx.constraintlayout.widget.ConstraintLayout>

You might also like