Loading res/layout-finger/contacts_list_item.xml +23 −25 Original line number Diff line number Diff line Loading @@ -23,6 +23,29 @@ android:paddingLeft="7dip" android:paddingRight="5dip" > <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="14dip" android:paddingRight="14dip" android:layout_alignParentRight="true" android:gravity="center_vertical" android:src="@android:drawable/sym_action_call" android:background="@drawable/call_background" /> <View android:id="@+id/divider" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_toLeftOf="@id/call_icon" android:layout_marginLeft="11dip" android:background="@drawable/divider_vertical_dark" /> <ImageView android:id="@+id/presence" android:layout_width="32dip" android:layout_height="32dip" Loading Loading @@ -77,29 +100,4 @@ android:textAppearance="?android:attr/textAppearanceLarge" /> <!-- ToDo: Not working :( <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="14dip" android:paddingRight="14dip" android:layout_alignParentRight="true" android:gravity="center_vertical" android:src="@android:drawable/sym_action_call" android:background="@drawable/call_background" /> <View android:id="@+id/divider" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_toLeftOf="@id/call_icon" android:layout_marginLeft="11dip" android:background="@drawable/divider_vertical_dark" /> --> </RelativeLayout> res/layout-finger/contacts_list_item_photo.xml +28 −5 Original line number Diff line number Diff line Loading @@ -21,13 +21,36 @@ android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:paddingLeft="5dip" android:paddingRight="5dip" > <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="14dip" android:paddingRight="14dip" android:layout_alignParentRight="true" android:gravity="center_vertical" android:src="@android:drawable/sym_action_call" android:background="@drawable/call_background" /> <View android:id="@+id/divider" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_toLeftOf="@id/call_icon" android:layout_marginLeft="11dip" android:background="@drawable/divider_vertical_dark" /> <ImageView android:id="@+id/presence" android:layout_width="32dip" android:layout_height="32dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_toLeftOf="@id/divider" android:layout_marginLeft="5dip" android:layout_centerVertical="true" Loading Loading @@ -76,8 +99,8 @@ /> <TextView android:id="@+id/name" android:layout_width="0dip" android:layout_height="0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/photo" android:layout_toLeftOf="@id/presence" android:layout_alignParentTop="true" Loading res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -767,6 +767,10 @@ <string name="summaryon_cl_ask_before_clear">Ask before clearing call log</string> <string name="summaryoff_cl_ask_before_clear">Call logs will be cleared without asking</string> <string name="title_contacts_category">Contacts</string> <string name="title_contacts_show_dial_button">Show dial button</string> <string name="summary_contacts_show_dial_button">Show a dial button for contacts with numbers</string> <string name="title_misc_category">Miscellaneous</string> <string name="title_sensor_rotation">Enable sensor rotation</string> Loading res/xml/contacts_preferences.xml +8 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,13 @@ android:summaryOff="@string/summaryoff_cl_ask_before_clear" android:defaultValue="false" /> </PreferenceCategory> <PreferenceCategory android:title="@string/title_contacts_category"> <CheckBoxPreference android:key="contacts_show_dial_button" android:title="@string/title_contacts_show_dial_button" android:summary="@string/summary_contacts_show_dial_button" android:defaultValue="true" /> </PreferenceCategory> <PreferenceCategory android:title="@string/title_misc_category"> <CheckBoxPreference android:key="misc_sensor_rotation" Loading src/com/android/contacts/ContactsListActivity.java +39 −20 Original line number Diff line number Diff line Loading @@ -346,6 +346,7 @@ public final class ContactsListActivity extends ListActivity private String mQueryData; private Handler mHandler = new Handler(); private SharedPreferences prefs; private class ImportTypeSelectedListener implements DialogInterface.OnClickListener { public static final int IMPORT_FROM_SIM = 0; Loading Loading @@ -388,6 +389,8 @@ public final class ContactsListActivity extends ListActivity protected void onCreate(Bundle icicle) { super.onCreate(icicle); prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); // Resolve the intent final Intent intent = getIntent(); Loading Loading @@ -849,6 +852,9 @@ public final class ContactsListActivity extends ListActivity menu.setGroupEnabled(MENU_GROUP_BT, bluetoothEnabled); menu.setGroupVisible(MENU_GROUP_BT, bluetoothEnabled); Intent i = new Intent(this, ContactsPreferences.class); menu.add(0, 0, 0, R.string.menu_preferences).setIcon(android.R.drawable.ic_menu_preferences).setIntent(i); return super.onCreateOptionsMenu(menu); } Loading Loading @@ -1757,7 +1763,8 @@ public final class ContactsListActivity extends ListActivity public CharArrayBuffer numberBuffer = new CharArrayBuffer(128); public ImageView presenceView; public ImageView photoView; //public View callView; //ToDo: Not working public View dividerView; public View callView; } private final class ContactItemListAdapter extends ResourceCursorAdapter Loading @@ -1772,7 +1779,7 @@ public final class ContactsListActivity extends ListActivity private int mFrequentSeparatorPos = ListView.INVALID_POSITION; public ContactItemListAdapter(Context context) { super(ContactsListActivity.this, R.layout.contacts_list_item, null, false); super(context, R.layout.contacts_list_item, null, false); mAlphabet = context.getString(com.android.internal.R.string.fast_scroll_alphabet); Loading Loading @@ -1898,12 +1905,9 @@ public final class ContactsListActivity extends ListActivity cache.numberView = (TextView) view.findViewById(R.id.number); cache.presenceView = (ImageView) view.findViewById(R.id.presence); cache.photoView = (ImageView) view.findViewById(R.id.photo); //cache.callView = view.findViewById(R.id.call_icon); /* if (cache.callView == null) Log.d("NULL: CALLVIEW", "Why?"); */ cache.dividerView = view.findViewById(R.id.divider); cache.callView = view.findViewById(R.id.call_icon); cache.callView.setOnClickListener(this); view.setTag(cache); Loading @@ -1914,10 +1918,6 @@ public final class ContactsListActivity extends ListActivity public void bindView(View view, Context context, Cursor cursor) { final ContactListItemCache cache = (ContactListItemCache) view.getTag(); //String number = cursor.getString(NUMBER_COLUMN_INDEX); //cache.callView.setTag(number); //cache.callView.setVisibility(View.VISIBLE); // Set the name cursor.copyStringToBuffer(NAME_COLUMN_INDEX, cache.nameBuffer); Loading @@ -1942,15 +1942,34 @@ public final class ContactsListActivity extends ListActivity // Set the phone number TextView numberView = cache.numberView; TextView labelView = cache.labelView; View divView = null; View callView = null; divView = cache.dividerView; callView = cache.callView; cursor.copyStringToBuffer(NUMBER_COLUMN_INDEX, cache.numberBuffer); size = cache.numberBuffer.sizeCopied; if (size != 0) { numberView.setText(cache.numberBuffer.data, 0, size); numberView.setVisibility(View.VISIBLE); labelView.setVisibility(View.VISIBLE); if (prefs.getBoolean("contacts_show_dial_button", true)) { callView.setTag(new String(cache.numberBuffer.data, 0, size)); //Wysie_Soh: Set tag to green dial button callView.setVisibility(View.VISIBLE); divView.setVisibility(View.VISIBLE); } else { callView.setTag(null); //Wysie_Soh: Set tag to green dial button callView.setVisibility(View.GONE); divView.setVisibility(View.GONE); } } else { numberView.setVisibility(View.GONE); labelView.setVisibility(View.GONE); callView.setVisibility(View.GONE); divView.setVisibility(View.GONE); } // Set the label Loading Loading
res/layout-finger/contacts_list_item.xml +23 −25 Original line number Diff line number Diff line Loading @@ -23,6 +23,29 @@ android:paddingLeft="7dip" android:paddingRight="5dip" > <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="14dip" android:paddingRight="14dip" android:layout_alignParentRight="true" android:gravity="center_vertical" android:src="@android:drawable/sym_action_call" android:background="@drawable/call_background" /> <View android:id="@+id/divider" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_toLeftOf="@id/call_icon" android:layout_marginLeft="11dip" android:background="@drawable/divider_vertical_dark" /> <ImageView android:id="@+id/presence" android:layout_width="32dip" android:layout_height="32dip" Loading Loading @@ -77,29 +100,4 @@ android:textAppearance="?android:attr/textAppearanceLarge" /> <!-- ToDo: Not working :( <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="14dip" android:paddingRight="14dip" android:layout_alignParentRight="true" android:gravity="center_vertical" android:src="@android:drawable/sym_action_call" android:background="@drawable/call_background" /> <View android:id="@+id/divider" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_toLeftOf="@id/call_icon" android:layout_marginLeft="11dip" android:background="@drawable/divider_vertical_dark" /> --> </RelativeLayout>
res/layout-finger/contacts_list_item_photo.xml +28 −5 Original line number Diff line number Diff line Loading @@ -21,13 +21,36 @@ android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:paddingLeft="5dip" android:paddingRight="5dip" > <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="14dip" android:paddingRight="14dip" android:layout_alignParentRight="true" android:gravity="center_vertical" android:src="@android:drawable/sym_action_call" android:background="@drawable/call_background" /> <View android:id="@+id/divider" android:layout_width="1px" android:layout_height="fill_parent" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_toLeftOf="@id/call_icon" android:layout_marginLeft="11dip" android:background="@drawable/divider_vertical_dark" /> <ImageView android:id="@+id/presence" android:layout_width="32dip" android:layout_height="32dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_toLeftOf="@id/divider" android:layout_marginLeft="5dip" android:layout_centerVertical="true" Loading Loading @@ -76,8 +99,8 @@ /> <TextView android:id="@+id/name" android:layout_width="0dip" android:layout_height="0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/photo" android:layout_toLeftOf="@id/presence" android:layout_alignParentTop="true" Loading
res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -767,6 +767,10 @@ <string name="summaryon_cl_ask_before_clear">Ask before clearing call log</string> <string name="summaryoff_cl_ask_before_clear">Call logs will be cleared without asking</string> <string name="title_contacts_category">Contacts</string> <string name="title_contacts_show_dial_button">Show dial button</string> <string name="summary_contacts_show_dial_button">Show a dial button for contacts with numbers</string> <string name="title_misc_category">Miscellaneous</string> <string name="title_sensor_rotation">Enable sensor rotation</string> Loading
res/xml/contacts_preferences.xml +8 −1 Original line number Diff line number Diff line Loading @@ -46,6 +46,13 @@ android:summaryOff="@string/summaryoff_cl_ask_before_clear" android:defaultValue="false" /> </PreferenceCategory> <PreferenceCategory android:title="@string/title_contacts_category"> <CheckBoxPreference android:key="contacts_show_dial_button" android:title="@string/title_contacts_show_dial_button" android:summary="@string/summary_contacts_show_dial_button" android:defaultValue="true" /> </PreferenceCategory> <PreferenceCategory android:title="@string/title_misc_category"> <CheckBoxPreference android:key="misc_sensor_rotation" Loading
src/com/android/contacts/ContactsListActivity.java +39 −20 Original line number Diff line number Diff line Loading @@ -346,6 +346,7 @@ public final class ContactsListActivity extends ListActivity private String mQueryData; private Handler mHandler = new Handler(); private SharedPreferences prefs; private class ImportTypeSelectedListener implements DialogInterface.OnClickListener { public static final int IMPORT_FROM_SIM = 0; Loading Loading @@ -388,6 +389,8 @@ public final class ContactsListActivity extends ListActivity protected void onCreate(Bundle icicle) { super.onCreate(icicle); prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); // Resolve the intent final Intent intent = getIntent(); Loading Loading @@ -849,6 +852,9 @@ public final class ContactsListActivity extends ListActivity menu.setGroupEnabled(MENU_GROUP_BT, bluetoothEnabled); menu.setGroupVisible(MENU_GROUP_BT, bluetoothEnabled); Intent i = new Intent(this, ContactsPreferences.class); menu.add(0, 0, 0, R.string.menu_preferences).setIcon(android.R.drawable.ic_menu_preferences).setIntent(i); return super.onCreateOptionsMenu(menu); } Loading Loading @@ -1757,7 +1763,8 @@ public final class ContactsListActivity extends ListActivity public CharArrayBuffer numberBuffer = new CharArrayBuffer(128); public ImageView presenceView; public ImageView photoView; //public View callView; //ToDo: Not working public View dividerView; public View callView; } private final class ContactItemListAdapter extends ResourceCursorAdapter Loading @@ -1772,7 +1779,7 @@ public final class ContactsListActivity extends ListActivity private int mFrequentSeparatorPos = ListView.INVALID_POSITION; public ContactItemListAdapter(Context context) { super(ContactsListActivity.this, R.layout.contacts_list_item, null, false); super(context, R.layout.contacts_list_item, null, false); mAlphabet = context.getString(com.android.internal.R.string.fast_scroll_alphabet); Loading Loading @@ -1898,12 +1905,9 @@ public final class ContactsListActivity extends ListActivity cache.numberView = (TextView) view.findViewById(R.id.number); cache.presenceView = (ImageView) view.findViewById(R.id.presence); cache.photoView = (ImageView) view.findViewById(R.id.photo); //cache.callView = view.findViewById(R.id.call_icon); /* if (cache.callView == null) Log.d("NULL: CALLVIEW", "Why?"); */ cache.dividerView = view.findViewById(R.id.divider); cache.callView = view.findViewById(R.id.call_icon); cache.callView.setOnClickListener(this); view.setTag(cache); Loading @@ -1914,10 +1918,6 @@ public final class ContactsListActivity extends ListActivity public void bindView(View view, Context context, Cursor cursor) { final ContactListItemCache cache = (ContactListItemCache) view.getTag(); //String number = cursor.getString(NUMBER_COLUMN_INDEX); //cache.callView.setTag(number); //cache.callView.setVisibility(View.VISIBLE); // Set the name cursor.copyStringToBuffer(NAME_COLUMN_INDEX, cache.nameBuffer); Loading @@ -1942,15 +1942,34 @@ public final class ContactsListActivity extends ListActivity // Set the phone number TextView numberView = cache.numberView; TextView labelView = cache.labelView; View divView = null; View callView = null; divView = cache.dividerView; callView = cache.callView; cursor.copyStringToBuffer(NUMBER_COLUMN_INDEX, cache.numberBuffer); size = cache.numberBuffer.sizeCopied; if (size != 0) { numberView.setText(cache.numberBuffer.data, 0, size); numberView.setVisibility(View.VISIBLE); labelView.setVisibility(View.VISIBLE); if (prefs.getBoolean("contacts_show_dial_button", true)) { callView.setTag(new String(cache.numberBuffer.data, 0, size)); //Wysie_Soh: Set tag to green dial button callView.setVisibility(View.VISIBLE); divView.setVisibility(View.VISIBLE); } else { callView.setTag(null); //Wysie_Soh: Set tag to green dial button callView.setVisibility(View.GONE); divView.setVisibility(View.GONE); } } else { numberView.setVisibility(View.GONE); labelView.setVisibility(View.GONE); callView.setVisibility(View.GONE); divView.setVisibility(View.GONE); } // Set the label Loading