0% found this document useful (0 votes)
21 views

9 ImageButton and Button

The document shows an example XML layout for a LinearLayout with three buttons - a regular button, an ImageButton, and a button with a drawable icon.

Uploaded by

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

9 ImageButton and Button

The document shows an example XML layout for a LinearLayout with three buttons - a regular button, an ImageButton, and a button with a drawable icon.

Uploaded by

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

Pratical No:- 9

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical" >

<Button
android:id="@+id/supabutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I'm a button" />

<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="A tiny Android icon"
android:src="@drawable/baseline_android_24"
app:tint="#ff0000" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/baseline_android_24"
android:drawablePadding="4dp"
android:drawableTint="#ff0000"
android:text="I'm a button with an icon" />
</LinearLayout>

OUTPUT:-

You might also like