res/layout/contactlistcontact.xml
author Da Risk <da_risk@beem-project.com>
Tue, 14 May 2013 18:24:25 +0200
changeset 1036 a1f3a20c87f8
parent 981 e1b1c8ad710a
permissions -rw-r--r--
ContactList: Separate creation of ContactListAdapter and managment of the group list This is two separate things. getContactListAdapter is called in ContactListFragment.onActivityCreated() which is during a fragment transaction. Management of the group list calls FragmentPagerAdapter.notifyDataSetChanged() which repopulate the FragmentPagerAdapter and to do so calls FragmentManager.executePendingTransactions() in a recursive way and is not allowed (IllegalStateException).

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:paddingLeft="10dp"
    android:paddingRight="10dp" android:paddingTop="8dp"
    android:paddingBottom="8dip" >
    <ImageView android:id="@+id/avatar"
	android:layout_width="48dip" android:layout_height="48dip"
	android:layout_alignParentLeft="true"
	android:layout_alignParentTop="true"
	/>
    <TextView android:id="@+id/contactlistpseudo"
	android:layout_width="fill_parent" android:layout_height="wrap_content"
	android:layout_alignParentTop="true"
	android:layout_toRightOf="@id/avatar"
	android:singleLine="true"
	android:maxLines="1"
	android:paddingLeft="10dp"
	android:textAppearance="?android:attr/textAppearanceMedium"
	android:textStyle="bold" />

    <TextView android:id="@+id/contactlistmsgperso"
	android:layout_width="fill_parent" android:layout_height="wrap_content"
	android:layout_below="@id/contactlistpseudo"
	android:layout_toRightOf="@id/avatar"
	android:paddingLeft="10dp" android:singleLine="true"
	android:maxLines="1" android:linksClickable="false" android:autoLink="all"
	android:scrollHorizontally="true" android:textColorLink="@color/white"
	android:textAppearance="?android:attr/textAppearanceSmall"
	/>
</RelativeLayout>