Adding the image to the layout Now it’s time to add the image to the layout. To do that, you need to type the following into the main.xml file, overwriting the current contents of the file:
<?xml version=”1.0” encoding=”utf-8”?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” > <ImageView android:id=”@+id/phone_icon” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_gravity=”center_horizontal” android:src=”@drawable/phone_on” /> </LinearLayout>
No comments:
Post a Comment