Replace ListView for Attendees with LinearLayout

Stop using ListView + Adapter implementation and use LinearLayout.

- rename AttendeesAdapter to AttendeesView.
- let attendee list maintained by LinearLayout (using tag),
  instead of manually having it with an array.
- remove unnecessary logic which has existed in the adapter.

TODO:
We still see some issue similar to 3101699.

Change-Id: Ic19343795a6f9d16632f7338d4d087e4fb44ddc0
diff --git a/res/layout/contact_item.xml b/res/layout/contact_item.xml
index d8b840c..49d561b 100644
--- a/res/layout/contact_item.xml
+++ b/res/layout/contact_item.xml
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -14,11 +14,11 @@
      limitations under the License.
 -->
 
-<RelativeLayout
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:paddingLeft="0dip"
-    android:paddingRight="0dip"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
     android:minHeight="48dip">
 
     <QuickContactBadge
@@ -27,50 +27,40 @@
         android:paddingRight="3dip"
         android:paddingTop="3dip"
         android:paddingBottom="6dip"
-        android:layout_above="@+id/separator"
         android:layout_marginLeft="2dip"
         android:layout_marginRight="14dip"
         android:layout_marginTop="4dip"
         android:layout_marginBottom="3dip"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentTop="true"
         android:src="@drawable/ic_contact_picture"
         style="?android:attr/quickContactBadgeStyleWindowMedium" />
 
-    <ImageView
-        android:id="@+id/presence"
-        android:scaleType="fitXY"
-        android:visibility="gone"
-        android:layout_toRightOf="@id/badge"
-        android:layout_centerVertical="true"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content" />
-
-    <ImageButton android:id="@+id/contact_remove"
-        style="@style/MinusButton"
-        android:visibility="gone"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_centerVertical="true" />
-
     <TextView
         android:id="@+id/name"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:inputType="none"
-        android:paddingLeft="2dip"
-        android:layout_centerVertical="true"
-        android:layout_toRightOf="@id/presence"
-        android:layout_toLeftOf="@id/contact_remove"
-        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        style="@style/TextAppearance.EditEvent_Label"/>
+        android:layout_width="0dip"
+        android:layout_weight="1"
+        android:layout_gravity="center_vertical"
+        android:gravity="center_vertical"
+        android:paddingRight="3dip"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        style="@style/TextAppearance.EditEvent_Label" />
 
-    <View
-        android:id="@+id/separator"
-        android:layout_width="match_parent"
-        android:layout_height="1px"
-        android:layout_alignParentBottom="true"
-        android:background="@android:drawable/divider_horizontal_bright" />
+    <ImageView
+        android:id="@+id/presence"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:paddingRight="3dip"
+        android:scaleType="fitXY"
+        android:visibility="gone" />
 
-</RelativeLayout>
+    <ImageButton
+        android:id="@+id/contact_remove"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:paddingRight="3dip"
+        android:visibility="gone"
+        style="@style/MinusButton" />
+
+</LinearLayout>