Loading res/values/strings.xml +17 −3 Original line number Diff line number Diff line Loading @@ -808,8 +808,14 @@ <string name="title_contacts_show_separators">Show alphabetical separators</string> <string name="summaryon_contacts_show_separators">Alphabetical separators will be shown in the contacts list</string> <string name="summaryoff_contacts_show_separators">Alphabetical separators will be hidden in the contacts list</string> <string name="groups_manager_title">Manage groups preferences</string> <string name="title_view_contact">View contact</string> <string name="summary_view_contact">Set preferences when viewing an individual contact</string> <string name="title_show_text_mobile_only">Text action for mobile only</string> <string name="summaryon_show_text_mobile_only">Only mobile numbers will have a text/sms action</string> <string name="summaryoff_show_text_mobile_only">All numbers will have a text/sms action</string> <string name="groups_manager_title">Manage groups</string> <string name="groups_manager_summary">Set preferences in groups manager</string> <string name="title_groups_ask_before_del">Ask before deleting</string> <string name="summaryon_groups_ask_before_del">Ask before deleting group</string> <string name="summaryoff_groups_ask_before_del">Groups will be deleted without asking</string> Loading @@ -821,6 +827,14 @@ <string name="summaryon_favs_ask_before_clear">Ask before clearing frequently called</string> <string name="summaryoff_favs_ask_before_clear">Frequently called entries will be cleared without asking</string> <string name="title_all_show_label">Show label</string> <string name="summaryon_all_show_label">Label (Mobile, Home, etc.) will be shown</string> <string name="summaryoff_all_show_label">Label (Mobile, Home, etc.) will be hidden</string> <string name="title_all_show_number">Show number</string> <string name="summaryon_all_show_number">Phone number will be shown</string> <string name="summaryoff_all_show_number">Phone number will be hidden</string> <string name="title_misc_category">Miscellaneous</string> <string name="title_sensor_rotation">Enable sensor rotation</string> Loading @@ -828,7 +842,7 @@ <string name="title_about_name">Mod Name</string> <string name="summary_about_name">Wysie Contacts</string> <string name="title_about_version">Version</string> <string name="summary_about_version">2.3</string> <string name="summary_about_version">2.33</string> <string name="title_about_credits">Credits</string> <string name="summary_about_credits">ChainsDD and the rest of XDA! :)</string> Loading res/xml/contacts_preferences.xml +58 −10 Original line number Diff line number Diff line Loading @@ -114,6 +114,18 @@ android:summary="@string/summary_cl_show_seconds" android:dependency="cl_relative_time" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_show_label" android:title="@string/title_all_show_label" android:summaryOn="@string/summaryon_all_show_label" android:summaryOff="@string/summaryoff_all_show_label" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_show_number" android:title="@string/title_all_show_number" android:summaryOn="@string/summaryon_all_show_number" android:summaryOff="@string/summaryoff_all_show_number" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_ask_before_clear" android:title="@string/title_cl_ask_before_clear" Loading @@ -131,6 +143,28 @@ android:key="contacts_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> <CheckBoxPreference android:key="contacts_show_label" android:title="@string/title_all_show_label" android:summaryOn="@string/summaryon_all_show_label" android:summaryOff="@string/summaryoff_all_show_label" android:defaultValue="true" /> <CheckBoxPreference android:key="contacts_show_number" android:title="@string/title_all_show_number" android:summaryOn="@string/summaryon_all_show_number" android:summaryOff="@string/summaryoff_all_show_number" android:defaultValue="true" /> <CheckBoxPreference android:key="contacts_show_alphabetical_separators" android:title="@string/title_contacts_show_separators" android:summaryOn="@string/summaryon_contacts_show_separators" android:summaryOff="@string/summaryoff_contacts_show_separators" android:defaultValue="true" /> <PreferenceScreen android:key="view_contact" android:title="@string/title_view_contact" android:summary="@string/summary_view_contact"> <ListPreference android:key="contacts_view_contact_pic_size" android:title="@string/title_contacts_view_pic_size" Loading @@ -140,14 +174,16 @@ android:entryValues="@array/view_contact_pic_sizes_values" android:defaultValue="78" /> <CheckBoxPreference android:key="contacts_show_alphabetical_separators" android:title="@string/title_contacts_show_separators" android:summaryOn="@string/summaryon_contacts_show_separators" android:summaryOff="@string/summaryoff_contacts_show_separators" android:defaultValue="true" /> android:key="contacts_show_text_mobile_only" android:title="@string/title_show_text_mobile_only" android:summaryOn="@string/summaryon_show_text_mobile_only" android:summaryOff="@string/summaryoff_show_text_mobile_only" android:defaultValue="false" /> </PreferenceScreen> <PreferenceScreen android:key="groups_management" android:title="@string/groups_manager_title"> android:title="@string/groups_manager_title" android:summary="@string/groups_manager_summary"> <CheckBoxPreference android:key="groups_ask_before_del" android:title="@string/title_groups_ask_before_del" Loading @@ -165,6 +201,18 @@ android:key="favs_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> <CheckBoxPreference android:key="favs_show_label" android:title="@string/title_all_show_label" android:summaryOn="@string/summaryon_all_show_label" android:summaryOff="@string/summaryoff_all_show_label" android:defaultValue="true" /> <CheckBoxPreference android:key="favs_show_number" android:title="@string/title_all_show_number" android:summaryOn="@string/summaryon_all_show_number" android:summaryOff="@string/summaryoff_all_show_number" android:defaultValue="true" /> <CheckBoxPreference android:key="favourites_hide_freq_called" android:title="@string/title_favourites_hide_freq_call" Loading src/com/android/contacts/ContactsListActivity.java +42 −5 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import android.widget.AlphabetIndexer; import android.widget.Filter; import android.widget.ImageView; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.ResourceCursorAdapter; import android.widget.SectionIndexer; import android.widget.TextView; Loading Loading @@ -1753,7 +1754,9 @@ public final class ContactsListActivity extends ListActivity if (Groups.GROUP_ANDROID_STARRED.equals(name)) { name = getString(R.string.starredInAndroid); } groups.add(name); if (name.equals(mDisplayInfo)) { currentIndex = groups.size() - 1; } Loading @@ -1765,6 +1768,9 @@ public final class ContactsListActivity extends ListActivity && Groups.GROUP_MY_CONTACTS.equals(mDisplayInfo)) { currentIndex = DISPLAY_GROUP_INDEX_MY_CONTACTS; } else if (currentIndex >= DISPLAY_GROUP_INDEX_MY_CONTACTS) { currentIndex += 1; //Wysie_Soh: Since My Contacts is inserted into index 2, it will cause index values from 2 onwards to be affected. } mDisplayGroupsIncludesMyContacts = true; } } Loading Loading @@ -2081,13 +2087,24 @@ public final class ContactsListActivity extends ListActivity divView = cache.dividerView; callView = cache.callView; RelativeLayout.LayoutParams newNameLayout = (RelativeLayout.LayoutParams) cache.nameView.getLayoutParams(); RelativeLayout.LayoutParams newNumberLayout = (RelativeLayout.LayoutParams) numberView.getLayoutParams(); cursor.copyStringToBuffer(NUMBER_COLUMN_INDEX, cache.numberBuffer); size = cache.numberBuffer.sizeCopied; if (size != 0) { if ((ePrefs.getBoolean("contacts_show_number", true) && mContactsTab) || (ePrefs.getBoolean("favs_show_number", true) && mFavTab)) { numberView.setText(cache.numberBuffer.data, 0, size); numberView.setVisibility(View.VISIBLE); } else { numberView.setVisibility(View.GONE); } labelView.setVisibility(View.VISIBLE); if ((ePrefs.getBoolean("contacts_show_dial_button", true) && mContactsTab) || (ePrefs.getBoolean("favs_show_dial_button", true) && mFavTab)) { callView.setTag(new String(cache.numberBuffer.data, 0, size)); //Wysie_Soh: Set tag to green dial button Loading @@ -2107,7 +2124,8 @@ public final class ContactsListActivity extends ListActivity } // Set the label if (!cursor.isNull(TYPE_COLUMN_INDEX)) { if (!cursor.isNull(TYPE_COLUMN_INDEX) && ((ePrefs.getBoolean("contacts_show_label", true) && mContactsTab) || (ePrefs.getBoolean("favs_show_label", true) && mFavTab))) { int type = cursor.getInt(TYPE_COLUMN_INDEX); if (type != People.Phones.TYPE_CUSTOM) { Loading @@ -2121,9 +2139,28 @@ public final class ContactsListActivity extends ListActivity // Don't check size, if it's zero just don't show anything labelView.setText(cache.labelBuffer.data, 0, cache.labelBuffer.sizeCopied); } //Wysie_Soh: Set layout rules programmatically newNameLayout.addRule(RelativeLayout.ABOVE, R.id.label); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, R.id.label); newNumberLayout.setMargins(5, 0, 0, 0); cache.nameView.setLayoutParams(newNameLayout); numberView.setLayoutParams(newNumberLayout); } else { // There is no label, hide the the view labelView.setVisibility(View.GONE); //Wysie_Soh: Set layout rules programmatically newNameLayout.addRule(RelativeLayout.ABOVE, R.id.number); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, 0); newNumberLayout.setMargins(0, -10, 0, 8); cache.nameView.setLayoutParams(newNameLayout); numberView.setLayoutParams(newNumberLayout); } // Set the proper icon (star or presence or nothing) Loading src/com/android/contacts/EditContactActivity.java +11 −4 Original line number Diff line number Diff line Loading @@ -270,10 +270,9 @@ public final class EditContactActivity extends Activity implements View.OnClickL case R.id.photoImage: { doAddPhotoAction(); //Wysie_Soh: Hide the virtual keyboard. Irritating visual glitch :P. Commented out for now. This somehow causes the keyboard input //to have no effect when the image selection is over :(. //InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); //mgr.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); //Wysie_Soh: Hide the virtual keyboard. Irritating visual glitch :P. InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); break; } Loading Loading @@ -613,6 +612,13 @@ public final class EditContactActivity extends Activity implements View.OnClickL @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) { //Delete temp file if it exists if (mImageCaptureUri != null) { File f = new File(mImageCaptureUri.getPath()); if (f.exists()) { f.delete(); } } return; } Loading Loading @@ -687,6 +693,7 @@ public final class EditContactActivity extends Activity implements View.OnClickL break; } } } @Override Loading src/com/android/contacts/RecentCallsListActivity.java +36 −5 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ import android.widget.Button; import android.view.View.OnClickListener; import android.app.AlertDialog; import android.content.DialogInterface; import android.widget.RelativeLayout; import com.android.internal.telephony.CallerInfo; import com.android.internal.telephony.ITelephony; Loading Loading @@ -505,16 +506,46 @@ public class RecentCallsListActivity extends ListActivity // Set the text lines if (!TextUtils.isEmpty(name)) { views.line1View.setText(name); views.labelView.setVisibility(View.VISIBLE); //views.labelView.setVisibility(View.VISIBLE); CharSequence numberLabel = Phones.getDisplayLabel(context, ntype, label, mLabelArray); RelativeLayout.LayoutParams newLine1Layout = (RelativeLayout.LayoutParams) views.line1View.getLayoutParams(); RelativeLayout.LayoutParams newNumberLayout = (RelativeLayout.LayoutParams) views.numberView.getLayoutParams(); if (prefs.getBoolean("cl_show_number", true)) { views.numberView.setVisibility(View.VISIBLE); views.numberView.setText(formattedNumber); if (!TextUtils.isEmpty(numberLabel)) { views.labelView.setText(numberLabel); } else { views.numberView.setVisibility(View.GONE); } if (!TextUtils.isEmpty(numberLabel) && prefs.getBoolean("cl_show_label", true)) { views.labelView.setVisibility(View.VISIBLE); views.labelView.setText(numberLabel); //Wysie_Soh: Set layout rules programmatically newLine1Layout.addRule(RelativeLayout.ABOVE, R.id.label); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, R.id.label); newNumberLayout.setMargins(5, 0, 0, 0); views.line1View.setLayoutParams(newLine1Layout); views.numberView.setLayoutParams(newNumberLayout); } else { views.labelView.setVisibility(View.GONE); //Wysie_Soh: Set layout rules programmatically newLine1Layout.addRule(RelativeLayout.ABOVE, R.id.number); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, 0); newNumberLayout.setMargins(0, -10, 0, 8); views.line1View.setLayoutParams(newLine1Layout); views.numberView.setLayoutParams(newNumberLayout); } } else { if (number.equals(CallerInfo.UNKNOWN_NUMBER)) { Loading Loading
res/values/strings.xml +17 −3 Original line number Diff line number Diff line Loading @@ -808,8 +808,14 @@ <string name="title_contacts_show_separators">Show alphabetical separators</string> <string name="summaryon_contacts_show_separators">Alphabetical separators will be shown in the contacts list</string> <string name="summaryoff_contacts_show_separators">Alphabetical separators will be hidden in the contacts list</string> <string name="groups_manager_title">Manage groups preferences</string> <string name="title_view_contact">View contact</string> <string name="summary_view_contact">Set preferences when viewing an individual contact</string> <string name="title_show_text_mobile_only">Text action for mobile only</string> <string name="summaryon_show_text_mobile_only">Only mobile numbers will have a text/sms action</string> <string name="summaryoff_show_text_mobile_only">All numbers will have a text/sms action</string> <string name="groups_manager_title">Manage groups</string> <string name="groups_manager_summary">Set preferences in groups manager</string> <string name="title_groups_ask_before_del">Ask before deleting</string> <string name="summaryon_groups_ask_before_del">Ask before deleting group</string> <string name="summaryoff_groups_ask_before_del">Groups will be deleted without asking</string> Loading @@ -821,6 +827,14 @@ <string name="summaryon_favs_ask_before_clear">Ask before clearing frequently called</string> <string name="summaryoff_favs_ask_before_clear">Frequently called entries will be cleared without asking</string> <string name="title_all_show_label">Show label</string> <string name="summaryon_all_show_label">Label (Mobile, Home, etc.) will be shown</string> <string name="summaryoff_all_show_label">Label (Mobile, Home, etc.) will be hidden</string> <string name="title_all_show_number">Show number</string> <string name="summaryon_all_show_number">Phone number will be shown</string> <string name="summaryoff_all_show_number">Phone number will be hidden</string> <string name="title_misc_category">Miscellaneous</string> <string name="title_sensor_rotation">Enable sensor rotation</string> Loading @@ -828,7 +842,7 @@ <string name="title_about_name">Mod Name</string> <string name="summary_about_name">Wysie Contacts</string> <string name="title_about_version">Version</string> <string name="summary_about_version">2.3</string> <string name="summary_about_version">2.33</string> <string name="title_about_credits">Credits</string> <string name="summary_about_credits">ChainsDD and the rest of XDA! :)</string> Loading
res/xml/contacts_preferences.xml +58 −10 Original line number Diff line number Diff line Loading @@ -114,6 +114,18 @@ android:summary="@string/summary_cl_show_seconds" android:dependency="cl_relative_time" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_show_label" android:title="@string/title_all_show_label" android:summaryOn="@string/summaryon_all_show_label" android:summaryOff="@string/summaryoff_all_show_label" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_show_number" android:title="@string/title_all_show_number" android:summaryOn="@string/summaryon_all_show_number" android:summaryOff="@string/summaryoff_all_show_number" android:defaultValue="true" /> <CheckBoxPreference android:key="cl_ask_before_clear" android:title="@string/title_cl_ask_before_clear" Loading @@ -131,6 +143,28 @@ android:key="contacts_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> <CheckBoxPreference android:key="contacts_show_label" android:title="@string/title_all_show_label" android:summaryOn="@string/summaryon_all_show_label" android:summaryOff="@string/summaryoff_all_show_label" android:defaultValue="true" /> <CheckBoxPreference android:key="contacts_show_number" android:title="@string/title_all_show_number" android:summaryOn="@string/summaryon_all_show_number" android:summaryOff="@string/summaryoff_all_show_number" android:defaultValue="true" /> <CheckBoxPreference android:key="contacts_show_alphabetical_separators" android:title="@string/title_contacts_show_separators" android:summaryOn="@string/summaryon_contacts_show_separators" android:summaryOff="@string/summaryoff_contacts_show_separators" android:defaultValue="true" /> <PreferenceScreen android:key="view_contact" android:title="@string/title_view_contact" android:summary="@string/summary_view_contact"> <ListPreference android:key="contacts_view_contact_pic_size" android:title="@string/title_contacts_view_pic_size" Loading @@ -140,14 +174,16 @@ android:entryValues="@array/view_contact_pic_sizes_values" android:defaultValue="78" /> <CheckBoxPreference android:key="contacts_show_alphabetical_separators" android:title="@string/title_contacts_show_separators" android:summaryOn="@string/summaryon_contacts_show_separators" android:summaryOff="@string/summaryoff_contacts_show_separators" android:defaultValue="true" /> android:key="contacts_show_text_mobile_only" android:title="@string/title_show_text_mobile_only" android:summaryOn="@string/summaryon_show_text_mobile_only" android:summaryOff="@string/summaryoff_show_text_mobile_only" android:defaultValue="false" /> </PreferenceScreen> <PreferenceScreen android:key="groups_management" android:title="@string/groups_manager_title"> android:title="@string/groups_manager_title" android:summary="@string/groups_manager_summary"> <CheckBoxPreference android:key="groups_ask_before_del" android:title="@string/title_groups_ask_before_del" Loading @@ -165,6 +201,18 @@ android:key="favs_show_pic" android:title="@string/title_contacts_show_pic" android:defaultValue="true" /> <CheckBoxPreference android:key="favs_show_label" android:title="@string/title_all_show_label" android:summaryOn="@string/summaryon_all_show_label" android:summaryOff="@string/summaryoff_all_show_label" android:defaultValue="true" /> <CheckBoxPreference android:key="favs_show_number" android:title="@string/title_all_show_number" android:summaryOn="@string/summaryon_all_show_number" android:summaryOff="@string/summaryoff_all_show_number" android:defaultValue="true" /> <CheckBoxPreference android:key="favourites_hide_freq_called" android:title="@string/title_favourites_hide_freq_call" Loading
src/com/android/contacts/ContactsListActivity.java +42 −5 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ import android.widget.AlphabetIndexer; import android.widget.Filter; import android.widget.ImageView; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.ResourceCursorAdapter; import android.widget.SectionIndexer; import android.widget.TextView; Loading Loading @@ -1753,7 +1754,9 @@ public final class ContactsListActivity extends ListActivity if (Groups.GROUP_ANDROID_STARRED.equals(name)) { name = getString(R.string.starredInAndroid); } groups.add(name); if (name.equals(mDisplayInfo)) { currentIndex = groups.size() - 1; } Loading @@ -1765,6 +1768,9 @@ public final class ContactsListActivity extends ListActivity && Groups.GROUP_MY_CONTACTS.equals(mDisplayInfo)) { currentIndex = DISPLAY_GROUP_INDEX_MY_CONTACTS; } else if (currentIndex >= DISPLAY_GROUP_INDEX_MY_CONTACTS) { currentIndex += 1; //Wysie_Soh: Since My Contacts is inserted into index 2, it will cause index values from 2 onwards to be affected. } mDisplayGroupsIncludesMyContacts = true; } } Loading Loading @@ -2081,13 +2087,24 @@ public final class ContactsListActivity extends ListActivity divView = cache.dividerView; callView = cache.callView; RelativeLayout.LayoutParams newNameLayout = (RelativeLayout.LayoutParams) cache.nameView.getLayoutParams(); RelativeLayout.LayoutParams newNumberLayout = (RelativeLayout.LayoutParams) numberView.getLayoutParams(); cursor.copyStringToBuffer(NUMBER_COLUMN_INDEX, cache.numberBuffer); size = cache.numberBuffer.sizeCopied; if (size != 0) { if ((ePrefs.getBoolean("contacts_show_number", true) && mContactsTab) || (ePrefs.getBoolean("favs_show_number", true) && mFavTab)) { numberView.setText(cache.numberBuffer.data, 0, size); numberView.setVisibility(View.VISIBLE); } else { numberView.setVisibility(View.GONE); } labelView.setVisibility(View.VISIBLE); if ((ePrefs.getBoolean("contacts_show_dial_button", true) && mContactsTab) || (ePrefs.getBoolean("favs_show_dial_button", true) && mFavTab)) { callView.setTag(new String(cache.numberBuffer.data, 0, size)); //Wysie_Soh: Set tag to green dial button Loading @@ -2107,7 +2124,8 @@ public final class ContactsListActivity extends ListActivity } // Set the label if (!cursor.isNull(TYPE_COLUMN_INDEX)) { if (!cursor.isNull(TYPE_COLUMN_INDEX) && ((ePrefs.getBoolean("contacts_show_label", true) && mContactsTab) || (ePrefs.getBoolean("favs_show_label", true) && mFavTab))) { int type = cursor.getInt(TYPE_COLUMN_INDEX); if (type != People.Phones.TYPE_CUSTOM) { Loading @@ -2121,9 +2139,28 @@ public final class ContactsListActivity extends ListActivity // Don't check size, if it's zero just don't show anything labelView.setText(cache.labelBuffer.data, 0, cache.labelBuffer.sizeCopied); } //Wysie_Soh: Set layout rules programmatically newNameLayout.addRule(RelativeLayout.ABOVE, R.id.label); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, R.id.label); newNumberLayout.setMargins(5, 0, 0, 0); cache.nameView.setLayoutParams(newNameLayout); numberView.setLayoutParams(newNumberLayout); } else { // There is no label, hide the the view labelView.setVisibility(View.GONE); //Wysie_Soh: Set layout rules programmatically newNameLayout.addRule(RelativeLayout.ABOVE, R.id.number); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, 0); newNumberLayout.setMargins(0, -10, 0, 8); cache.nameView.setLayoutParams(newNameLayout); numberView.setLayoutParams(newNumberLayout); } // Set the proper icon (star or presence or nothing) Loading
src/com/android/contacts/EditContactActivity.java +11 −4 Original line number Diff line number Diff line Loading @@ -270,10 +270,9 @@ public final class EditContactActivity extends Activity implements View.OnClickL case R.id.photoImage: { doAddPhotoAction(); //Wysie_Soh: Hide the virtual keyboard. Irritating visual glitch :P. Commented out for now. This somehow causes the keyboard input //to have no effect when the image selection is over :(. //InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); //mgr.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); //Wysie_Soh: Hide the virtual keyboard. Irritating visual glitch :P. InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); break; } Loading Loading @@ -613,6 +612,13 @@ public final class EditContactActivity extends Activity implements View.OnClickL @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) { //Delete temp file if it exists if (mImageCaptureUri != null) { File f = new File(mImageCaptureUri.getPath()); if (f.exists()) { f.delete(); } } return; } Loading Loading @@ -687,6 +693,7 @@ public final class EditContactActivity extends Activity implements View.OnClickL break; } } } @Override Loading
src/com/android/contacts/RecentCallsListActivity.java +36 −5 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ import android.widget.Button; import android.view.View.OnClickListener; import android.app.AlertDialog; import android.content.DialogInterface; import android.widget.RelativeLayout; import com.android.internal.telephony.CallerInfo; import com.android.internal.telephony.ITelephony; Loading Loading @@ -505,16 +506,46 @@ public class RecentCallsListActivity extends ListActivity // Set the text lines if (!TextUtils.isEmpty(name)) { views.line1View.setText(name); views.labelView.setVisibility(View.VISIBLE); //views.labelView.setVisibility(View.VISIBLE); CharSequence numberLabel = Phones.getDisplayLabel(context, ntype, label, mLabelArray); RelativeLayout.LayoutParams newLine1Layout = (RelativeLayout.LayoutParams) views.line1View.getLayoutParams(); RelativeLayout.LayoutParams newNumberLayout = (RelativeLayout.LayoutParams) views.numberView.getLayoutParams(); if (prefs.getBoolean("cl_show_number", true)) { views.numberView.setVisibility(View.VISIBLE); views.numberView.setText(formattedNumber); if (!TextUtils.isEmpty(numberLabel)) { views.labelView.setText(numberLabel); } else { views.numberView.setVisibility(View.GONE); } if (!TextUtils.isEmpty(numberLabel) && prefs.getBoolean("cl_show_label", true)) { views.labelView.setVisibility(View.VISIBLE); views.labelView.setText(numberLabel); //Wysie_Soh: Set layout rules programmatically newLine1Layout.addRule(RelativeLayout.ABOVE, R.id.label); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, R.id.label); newNumberLayout.setMargins(5, 0, 0, 0); views.line1View.setLayoutParams(newLine1Layout); views.numberView.setLayoutParams(newNumberLayout); } else { views.labelView.setVisibility(View.GONE); //Wysie_Soh: Set layout rules programmatically newLine1Layout.addRule(RelativeLayout.ABOVE, R.id.number); newNumberLayout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); newNumberLayout.addRule(RelativeLayout.ALIGN_BASELINE, 0); newNumberLayout.setMargins(0, -10, 0, 8); views.line1View.setLayoutParams(newLine1Layout); views.numberView.setLayoutParams(newNumberLayout); } } else { if (number.equals(CallerInfo.UNKNOWN_NUMBER)) { Loading