I m trying to replicate Apple s layout of its app icons. I m having trouble using <merge>
and <include>
as it doesn t seem to show up in the app when I run it.
Here s the merge part:
<Button android:id="@+id/deleteContact"
android:text="X"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/personName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="bottom|right"
android:layout_gravity="bottom|right"
android:textSize="20sp"
android:text="asdfasdf"/>
<ImageView android:id="@+id/personImage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/icon"/>
</merge>
其中包括:
<?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="wrap_content">
<include layout="@layout/icon"/>
</LinearLayout>
我把他们放在一个电网上:
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/contactsGrid"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="fill_parent"
android:numColumns="3"
android:horizontalSpacing="3dip"
android:verticalSpacing="3dip" />
然而,当我们增加删除纽芬兰语时,整个icon本身可能再被点击。