0
I am developing a mobile application and wanted to make my application look like this
But I’m not able to put the text under the button and put a gray background color on the button because I’m already setting the background-color of the button with an image.
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.tulio.exercicio3.MainActivity">
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="RGM:XXXXX"
android:textAlignment="center"
android:textColor="@android:color/darker_gray"
android:textSize="24sp"
android:typeface="normal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Fulann"
android:textAlignment="center"
android:textColor="@android:color/darker_gray"
android:textSize="24sp"
android:typeface="normal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="116dp"
android:background="@android:color/holo_blue_bright"
android:text="Principal" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/auto"
android:text="Auto" />
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="88dp"
android:background="@drawable/portateis"
android:text="Portáteis" />
</LinearLayout>
</LinearLayout>
how would I do that ?
– User1999