Computer scienceMobileAndroidUser Interface

Button

Theory

Arranging Button Attributes in XML

Report a typo

The following XML snippet outlines the declaration of a button in an Android app's layout file. However, some attributes are omitted. Your task is to arrange these attributes in the correct order.

<Button
    android:id="@+id/myButton"
    android:layout_width="wrap_content"
    android:...="30dp"
    android:...="@drawable/custom_button_bg"
    android:...="#FFFFFF"
    android:textSize="18sp"
    android:...="Styled Button" />
Put the items in the correct order
android:background
android:textColor
android:layout_height
android:text

Create a free account to access the full topic