* #24533 New Contact List, with data model
* #23415 general refactoring
diff --git a/res/layout/clearable_edit_text.xml b/res/layout/clearable_edit_text.xml
new file mode 100644
index 0000000..5ce602c
--- /dev/null
+++ b/res/layout/clearable_edit_text.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <EditText
+ android:id="@+id/clearable_edit"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingRight="35dip" />
+
+ <Button
+ android:id="@+id/clearable_button_clear"
+ android:layout_width="30dip"
+ android:layout_height="30dip"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:layout_marginRight="5dip"
+ android:background="@drawable/ic_menu_close_clear_cancel" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/frag_contact_list.xml b/res/layout/frag_contact_list.xml
index 015f1b4..f84c00b 100644
--- a/res/layout/frag_contact_list.xml
+++ b/res/layout/frag_contact_list.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
Author: Adrien Beraud <adrien.beraud@gmail.com>
@@ -28,29 +28,41 @@
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
- -->
+-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingLeft="8dp"
- android:paddingRight="8dp" >
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="false"
+ android:focusableInTouchMode="false"
+ android:orientation="vertical"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp" >
- <ListView
- android:id="@id/android:list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- style="@style/CallElementList"
- android:drawSelectorOnTop="false" />
+
+ <ListView
+ android:id="@+id/contacts_list"
+ style="@style/CallElementList"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="#DDDDDD"
+ android:clickable="true"
+ android:focusable="true"
+ android:focusableInTouchMode="true" />
- <TextView
- android:id="@id/android:empty"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:gravity="center"
- android:text="No data" />
+ <TextView
+ android:id="@+id/empty_list_contact"
+ android:layout_width="match_parent"
+ android:layout_height="40dp"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:text="No data" />
-</LinearLayout>
+ <!-- <TextView -->
+ <!-- android:id="@+id/empty_list_starred" -->
+ <!-- android:layout_width="match_parent" -->
+ <!-- android:layout_height="match_parent" -->
+ <!-- android:gravity="center" -->
+ <!-- android:text="No data" /> -->
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/frag_contact_list_header.xml b/res/layout/frag_contact_list_header.xml
new file mode 100644
index 0000000..f5f71d6
--- /dev/null
+++ b/res/layout/frag_contact_list_header.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/container"
+ android:layout_width="200dp"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <com.savoirfairelinux.sflphone.views.TACGridView
+ android:id="@+id/favorites_grid"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:columnWidth="80dp"
+ android:numColumns="auto_fit"
+ android:stretchMode="spacingWidth" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/frag_dialing.xml b/res/layout/frag_dialing.xml
new file mode 100644
index 0000000..7b85342
--- /dev/null
+++ b/res/layout/frag_dialing.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="9dp"
+ android:padding="5dp">
+
+ <com.savoirfairelinux.sflphone.views.ClearableEditText
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="My cool edit text" />
+
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/item_contact.xml b/res/layout/item_contact.xml
index 423ab66..91e565e 100644
--- a/res/layout/item_contact.xml
+++ b/res/layout/item_contact.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
Author: Adrien Beraud <adrien.beraud@gmail.com>
@@ -29,73 +29,58 @@
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
-->
-<com.savoirfairelinux.sflphone.client.CallElementView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/panel"
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/contactview"
+ android:background="@drawable/box_border"
android:layout_width="match_parent"
android:layout_height="match_parent" >
- <!-- android:minHeight="70dp" > -->
- <RelativeLayout
- android:id="@+id/contactview"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/box_border">
- <ImageButton
- android:id="@+id/toggleButton1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:background="#00000000"
- android:drawableLeft="@drawable/call_pause"
- android:gravity="left|center_vertical"
- android:src="@drawable/call_pause"
- android:visibility="gone" />
- <ImageView
- android:id="@+id/photo"
- android:layout_width="70dp"
- android:layout_height="70dp"
- android:scaleType="centerCrop"
- android:src="@drawable/box_border" />
- <TextView
- android:id="@+id/display_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@+id/photo"
-
- android:paddingLeft="@dimen/padding_small"
- android:paddingTop="@dimen/padding_small"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- <TextView
- android:id="@+id/phones"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/display_name"
- android:layout_toRightOf="@+id/photo"
- android:paddingBottom="@dimen/padding_small"
- android:paddingLeft="@dimen/padding_small"
- android:text="Small Text"
- android:textAppearance="?android:attr/textAppearanceSmall" />
- <TextView
- android:id="@+id/callstate"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/display_name"
- android:layout_toRightOf="@+id/phones"
- android:paddingBottom="@dimen/padding_small"
- android:paddingLeft="@dimen/padding_small"
- android:text="Small Text"
- android:textAppearance="?android:attr/textAppearanceSmall" />
- <!--
- <ImageButton
- android:id="@+id/imageButton1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:background="#00000000"
- android:src="@android:drawable/sym_action_call" />
- -->
- </RelativeLayout>
-</com.savoirfairelinux.sflphone.client.CallElementView>
+ <ImageView
+ android:id="@+id/photo"
+ android:layout_width="70dp"
+ android:layout_height="70dp"
+ android:scaleType="centerCrop" />
+
+ <TextView
+ android:id="@+id/display_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@+id/photo"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <TextView
+ android:id="@+id/phones"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/display_name"
+ android:layout_toRightOf="@+id/photo"
+ android:text="Small Text"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+ <TextView
+ android:id="@+id/callstate"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/display_name"
+ android:layout_toRightOf="@+id/phones"
+ android:paddingBottom="@dimen/padding_small"
+ android:paddingLeft="@dimen/padding_small"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+
+<!-- <ImageButton -->
+<!-- android:id="@+id/toggleButton1" -->
+<!-- android:layout_width="wrap_content" -->
+<!-- android:layout_height="wrap_content" -->
+<!-- android:layout_alignParentRight="true" -->
+<!-- android:layout_centerVertical="true" -->
+<!-- android:background="#CCCCCC" -->
+<!-- android:clickable="false" -->
+<!-- android:drawableLeft="@drawable/call_pause" -->
+<!-- android:focusable="false" -->
+<!-- android:gravity="left|center_vertical" -->
+<!-- android:src="@drawable/call_pause" /> -->
+ -->
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/item_contact_starred.xml b/res/layout/item_contact_starred.xml
new file mode 100644
index 0000000..dac4011
--- /dev/null
+++ b/res/layout/item_contact_starred.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/contactview"
+ android:layout_margin="5dp"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+
+ <ImageView
+ android:id="@+id/photo"
+ android:layout_width="80dp"
+ android:layout_height="80dp"
+ android:scaleType="centerCrop"/>
+
+ <TextView
+ android:id="@+id/display_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@+id/photo"
+ android:singleLine="true"
+ android:textSize="10sp" />
+
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/item_history.xml b/res/layout/item_history.xml
index 8386954..62359c8 100644
--- a/res/layout/item_history.xml
+++ b/res/layout/item_history.xml
@@ -29,71 +29,65 @@
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
-->
-<com.savoirfairelinux.sflphone.client.CallElementView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/panel"
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/contactview"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
+ android:layout_height="match_parent"
+ android:background="@drawable/box_border" >
- <!-- android:minHeight="70dp" > -->
+ <ImageButton
+ android:id="@+id/toggleButton1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:background="#00000000"
+ android:drawableLeft="@drawable/call_pause"
+ android:gravity="left|center_vertical"
+ android:src="@drawable/call_pause"
+ android:visibility="gone" />
- <RelativeLayout
- android:id="@+id/contactview"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/box_border" >
+ <ImageView
+ android:id="@+id/photo"
+ android:layout_width="70dp"
+ android:layout_height="70dp"
+ android:scaleType="centerCrop"
+ android:src="@drawable/box_border" />
- <ImageButton
- android:id="@+id/toggleButton1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:background="#00000000"
- android:drawableLeft="@drawable/call_pause"
- android:gravity="left|center_vertical"
- android:src="@drawable/call_pause"
- android:visibility="gone" />
+ <TextView
+ android:id="@+id/display_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@+id/photo"
+ android:paddingLeft="@dimen/padding_small"
+ android:paddingTop="@dimen/padding_small"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
- <ImageView
- android:id="@+id/photo"
- android:layout_width="70dp"
- android:layout_height="70dp"
- android:scaleType="centerCrop"
- android:src="@drawable/box_border" />
+ <TextView
+ android:id="@+id/duration"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/display_name"
+ android:layout_toRightOf="@+id/photo"
+ android:paddingBottom="@dimen/padding_small"
+ android:paddingLeft="@dimen/padding_small"
+ android:text="Small Text"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
- <TextView
- android:id="@+id/display_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_toRightOf="@+id/photo"
- android:paddingLeft="@dimen/padding_small"
- android:paddingTop="@dimen/padding_small"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ <TextView
+ android:id="@+id/date_start"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/display_name"
+ android:layout_toRightOf="@+id/duration"
+ android:paddingBottom="@dimen/padding_small"
+ android:paddingLeft="@dimen/padding_small"
+ android:text="Small Text"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
- <TextView
- android:id="@+id/duration"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/display_name"
- android:layout_toRightOf="@+id/photo"
- android:paddingBottom="@dimen/padding_small"
- android:paddingLeft="@dimen/padding_small"
- android:text="Small Text"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
- <TextView
- android:id="@+id/date_start"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/display_name"
- android:layout_toRightOf="@+id/duration"
- android:paddingBottom="@dimen/padding_small"
- android:paddingLeft="@dimen/padding_small"
- android:text="Small Text"
- android:textAppearance="?android:attr/textAppearanceSmall" />
-
- <!--
+ <!--
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
@@ -102,7 +96,6 @@
android:layout_alignParentTop="true"
android:background="#00000000"
android:src="@android:drawable/sym_action_call" />
- -->
- </RelativeLayout>
+ -->
-</com.savoirfairelinux.sflphone.client.CallElementView>
\ No newline at end of file
+</RelativeLayout>
\ No newline at end of file