Loading res/layout/contact_tile_list.xml +2 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ android:layout_height="match_parent" android:gravity="center_horizontal" android:layout_marginTop="@dimen/empty_message_top_margin" android:textAppearance="?android:attr/textAppearanceMedium"/> android:textColor="?android:attr/textColorSecondary" android:textAppearance="?android:attr/textAppearanceLarge"/> </FrameLayout> res/layout/contacts_unavailable_fragment.xml +62 −51 Original line number Diff line number Diff line Loading @@ -14,30 +14,40 @@ limitations under the License. --> <com.android.contacts.widget.InterpolatingLayout <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts" android:layout_width="match_parent" android:fillViewport="true"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:background="@drawable/panel_message"> <LinearLayout android:layout_width="0dip" <TextView android:id="@+id/message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="vertical" ex:layout_narrowParentWidth="600dip" ex:layout_narrowWidth="400dip" ex:layout_wideParentWidth="880dip" ex:layout_wideWidth="600dip"> android:layout_marginTop="48dip" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="?android:attr/textColorSecondary" /> <TextView android:id="@+id/message" android:layout_width="match_parent" android:id="@+id/secondary_message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_marginBottom="20dip" /> android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorSecondary" android:layout_gravity="center_horizontal" android:layout_marginBottom="@dimen/no_accounts_message_margin" /> <LinearLayout android:orientation="vertical" android:layout_marginLeft="48dip" android:layout_marginRight="48dip" android:layout_width="wrap_content" android:layout_height="match_parent"> <Button android:id="@+id/create_contact_button" android:layout_width="match_parent" Loading Loading @@ -80,4 +90,5 @@ android:layout_gravity="center_horizontal" android:layout_marginBottom="15dip" /> </LinearLayout> </com.android.contacts.widget.InterpolatingLayout> </LinearLayout> </ScrollView> No newline at end of file res/layout/group_browse_list_fragment.xml +6 −7 Original line number Diff line number Diff line Loading @@ -38,32 +38,31 @@ android:layout_marginTop="@dimen/empty_message_top_margin" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="8dip" android:gravity="center_horizontal" android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="?android:attr/textColorSecondary" android:text="@string/noGroups" /> <LinearLayout android:id="@+id/add_accounts" android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:layout_marginTop="@dimen/no_accounts_message_margin" android:layout_marginBottom="@dimen/no_accounts_message_margin" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorSecondary" android:text="@string/noAccounts" /> <Button android:id="@+id/add_account_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/add_account_button_left_margin" android:layout_marginRight="@dimen/add_account_button_right_margin" android:gravity="center" android:layout_gravity="center_horizontal" android:textAppearance="?android:attr/textAppearanceMedium" Loading res/values/dimens.xml +2 −4 Original line number Diff line number Diff line Loading @@ -240,10 +240,8 @@ <dimen name="call_detail_action_bar_height">60dip</dimen> <!-- Empty message margins --> <dimen name="empty_message_top_margin">43dip</dimen> <dimen name="no_accounts_message_margin">15dip</dimen> <dimen name="add_account_button_left_margin">50dip</dimen> <dimen name="add_account_button_right_margin">50dip</dimen> <dimen name="empty_message_top_margin">48dip</dimen> <dimen name="no_accounts_message_margin">20dip</dimen> <!-- For contact filter setting screens --> <dimen name="contact_filter_left_margin">16dip</dimen> Loading src/com/android/contacts/ContactsUtils.java +12 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.contacts; import com.android.contacts.model.AccountTypeManager; import com.android.contacts.model.AccountWithDataSet; import com.android.i18n.phonenumbers.NumberParseException; import com.android.i18n.phonenumbers.PhoneNumberUtil; import com.android.i18n.phonenumbers.PhoneNumberUtil.MatchType; Loading @@ -29,6 +31,8 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import java.util.List; public class ContactsUtils { private static final String TAG = "ContactsUtils"; private static final String WAIT_SYMBOL_AS_STRING = String.valueOf(PhoneNumberUtils.WAIT); Loading Loading @@ -166,4 +170,12 @@ public class ContactsUtils { (CountryDetector) context.getSystemService(Context.COUNTRY_DETECTOR); return detector.detectCountry().getCountryIso(); } public static boolean areAccountsAvailable(Context context) { final List<AccountWithDataSet> accounts = AccountTypeManager.getInstance(context).getAccounts(true /* writeable */); return !accounts.isEmpty(); } } Loading
res/layout/contact_tile_list.xml +2 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ android:layout_height="match_parent" android:gravity="center_horizontal" android:layout_marginTop="@dimen/empty_message_top_margin" android:textAppearance="?android:attr/textAppearanceMedium"/> android:textColor="?android:attr/textColorSecondary" android:textAppearance="?android:attr/textAppearanceLarge"/> </FrameLayout>
res/layout/contacts_unavailable_fragment.xml +62 −51 Original line number Diff line number Diff line Loading @@ -14,30 +14,40 @@ limitations under the License. --> <com.android.contacts.widget.InterpolatingLayout <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts" android:layout_width="match_parent" android:fillViewport="true"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:background="@drawable/panel_message"> <LinearLayout android:layout_width="0dip" <TextView android:id="@+id/message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="vertical" ex:layout_narrowParentWidth="600dip" ex:layout_narrowWidth="400dip" ex:layout_wideParentWidth="880dip" ex:layout_wideWidth="600dip"> android:layout_marginTop="48dip" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="?android:attr/textColorSecondary" /> <TextView android:id="@+id/message" android:layout_width="match_parent" android:id="@+id/secondary_message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_marginBottom="20dip" /> android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorSecondary" android:layout_gravity="center_horizontal" android:layout_marginBottom="@dimen/no_accounts_message_margin" /> <LinearLayout android:orientation="vertical" android:layout_marginLeft="48dip" android:layout_marginRight="48dip" android:layout_width="wrap_content" android:layout_height="match_parent"> <Button android:id="@+id/create_contact_button" android:layout_width="match_parent" Loading Loading @@ -80,4 +90,5 @@ android:layout_gravity="center_horizontal" android:layout_marginBottom="15dip" /> </LinearLayout> </com.android.contacts.widget.InterpolatingLayout> </LinearLayout> </ScrollView> No newline at end of file
res/layout/group_browse_list_fragment.xml +6 −7 Original line number Diff line number Diff line Loading @@ -38,32 +38,31 @@ android:layout_marginTop="@dimen/empty_message_top_margin" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="8dip" android:gravity="center_horizontal" android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="?android:attr/textColorSecondary" android:text="@string/noGroups" /> <LinearLayout android:id="@+id/add_accounts" android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:layout_marginTop="@dimen/no_accounts_message_margin" android:layout_marginBottom="@dimen/no_accounts_message_margin" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorSecondary" android:text="@string/noAccounts" /> <Button android:id="@+id/add_account_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/add_account_button_left_margin" android:layout_marginRight="@dimen/add_account_button_right_margin" android:gravity="center" android:layout_gravity="center_horizontal" android:textAppearance="?android:attr/textAppearanceMedium" Loading
res/values/dimens.xml +2 −4 Original line number Diff line number Diff line Loading @@ -240,10 +240,8 @@ <dimen name="call_detail_action_bar_height">60dip</dimen> <!-- Empty message margins --> <dimen name="empty_message_top_margin">43dip</dimen> <dimen name="no_accounts_message_margin">15dip</dimen> <dimen name="add_account_button_left_margin">50dip</dimen> <dimen name="add_account_button_right_margin">50dip</dimen> <dimen name="empty_message_top_margin">48dip</dimen> <dimen name="no_accounts_message_margin">20dip</dimen> <!-- For contact filter setting screens --> <dimen name="contact_filter_left_margin">16dip</dimen> Loading
src/com/android/contacts/ContactsUtils.java +12 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.contacts; import com.android.contacts.model.AccountTypeManager; import com.android.contacts.model.AccountWithDataSet; import com.android.i18n.phonenumbers.NumberParseException; import com.android.i18n.phonenumbers.PhoneNumberUtil; import com.android.i18n.phonenumbers.PhoneNumberUtil.MatchType; Loading @@ -29,6 +31,8 @@ import android.provider.ContactsContract.CommonDataKinds.Phone; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import java.util.List; public class ContactsUtils { private static final String TAG = "ContactsUtils"; private static final String WAIT_SYMBOL_AS_STRING = String.valueOf(PhoneNumberUtils.WAIT); Loading Loading @@ -166,4 +170,12 @@ public class ContactsUtils { (CountryDetector) context.getSystemService(Context.COUNTRY_DETECTOR); return detector.detectCountry().getCountryIso(); } public static boolean areAccountsAvailable(Context context) { final List<AccountWithDataSet> accounts = AccountTypeManager.getInstance(context).getAccounts(true /* writeable */); return !accounts.isEmpty(); } }