Loading res/layout-sw580dp-w1000dp/people_activity.xml +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ <!-- Most Frequent --> <fragment android:id="@+id/frequent_fragment" class="com.android.contacts.list.ContactTileListFragment" class="com.android.contacts.list.ContactTileFrequentFragment" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="3" Loading res/layout-sw580dp/people_activity.xml +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ <!-- Most Frequent --> <fragment android:id="@+id/frequent_fragment" class="com.android.contacts.list.ContactTileListFragment" class="com.android.contacts.list.ContactTileFrequentFragment" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="8" Loading res/layout/contact_tile_list_frequent.xml 0 → 100644 +51 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2011 The Android Open Source Project 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. See the License for the specific language governing permissions and limitations under the License. --> <!-- This is very similar to contact_tile_list.xml (there needs to be a ListView called contact_tile_list and an empty view called contact_tile_list_empty). However, this layout also contains a container view for the title of the frequently contacted list. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="?attr/favorites_padding_bottom" android:orientation="vertical"> <FrameLayout android:id="@+id/header_container" android:layout_width="match_parent" android:layout_height="wrap_content"/> <ListView android:id="@+id/contact_tile_list" android:layout_width="match_parent" android:layout_height="match_parent" android:fadingEdge="none" android:divider="@null" /> <TextView android:id="@+id/contact_tile_list_empty" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:layout_marginTop="@dimen/empty_message_top_margin" android:textColor="?android:attr/textColorSecondary" android:textAppearance="?android:attr/textAppearanceLarge"/> </LinearLayout> src/com/android/contacts/ContactsUtils.java +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ import android.provider.ContactsContract.CommonDataKinds.Im; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import java.util.List; Loading Loading @@ -208,4 +210,15 @@ public class ContactsUtils { intent.setData(lookupUri); return intent; } /** * Returns a header view based on the R.layout.list_separator, where the * containing {@link TextView} is set using the given textResourceId. */ public static View createHeaderView(Context context, int textResourceId) { View view = View.inflate(context, R.layout.list_separator, null); TextView textView = (TextView) view.findViewById(R.id.title); textView.setText(context.getString(textResourceId)); return view; } } src/com/android/contacts/activities/PeopleActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.contacts.list.ContactEntryListFragment; import com.android.contacts.list.ContactListFilter; import com.android.contacts.list.ContactListFilterController; import com.android.contacts.list.ContactTileAdapter.DisplayType; import com.android.contacts.list.ContactTileFrequentFragment; import com.android.contacts.list.ContactTileListFragment; import com.android.contacts.list.ContactsIntentResolver; import com.android.contacts.list.ContactsRequest; Loading Loading @@ -145,7 +146,7 @@ public class PeopleActivity extends ContactsActivity */ private DefaultContactBrowseListFragment mAllFragment; private ContactTileListFragment mFavoritesFragment; private ContactTileListFragment mFrequentFragment; private ContactTileFrequentFragment mFrequentFragment; private GroupBrowseListFragment mGroupsFragment; private View mFavoritesView; Loading Loading
res/layout-sw580dp-w1000dp/people_activity.xml +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ <!-- Most Frequent --> <fragment android:id="@+id/frequent_fragment" class="com.android.contacts.list.ContactTileListFragment" class="com.android.contacts.list.ContactTileFrequentFragment" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="3" Loading
res/layout-sw580dp/people_activity.xml +1 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ <!-- Most Frequent --> <fragment android:id="@+id/frequent_fragment" class="com.android.contacts.list.ContactTileListFragment" class="com.android.contacts.list.ContactTileFrequentFragment" android:layout_width="0dip" android:layout_height="match_parent" android:layout_weight="8" Loading
res/layout/contact_tile_list_frequent.xml 0 → 100644 +51 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2011 The Android Open Source Project 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. See the License for the specific language governing permissions and limitations under the License. --> <!-- This is very similar to contact_tile_list.xml (there needs to be a ListView called contact_tile_list and an empty view called contact_tile_list_empty). However, this layout also contains a container view for the title of the frequently contacted list. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="?attr/favorites_padding_bottom" android:orientation="vertical"> <FrameLayout android:id="@+id/header_container" android:layout_width="match_parent" android:layout_height="wrap_content"/> <ListView android:id="@+id/contact_tile_list" android:layout_width="match_parent" android:layout_height="match_parent" android:fadingEdge="none" android:divider="@null" /> <TextView android:id="@+id/contact_tile_list_empty" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" android:layout_marginTop="@dimen/empty_message_top_margin" android:textColor="?android:attr/textColorSecondary" android:textAppearance="?android:attr/textAppearanceLarge"/> </LinearLayout>
src/com/android/contacts/ContactsUtils.java +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ import android.provider.ContactsContract.CommonDataKinds.Im; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import java.util.List; Loading Loading @@ -208,4 +210,15 @@ public class ContactsUtils { intent.setData(lookupUri); return intent; } /** * Returns a header view based on the R.layout.list_separator, where the * containing {@link TextView} is set using the given textResourceId. */ public static View createHeaderView(Context context, int textResourceId) { View view = View.inflate(context, R.layout.list_separator, null); TextView textView = (TextView) view.findViewById(R.id.title); textView.setText(context.getString(textResourceId)); return view; } }
src/com/android/contacts/activities/PeopleActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.contacts.list.ContactEntryListFragment; import com.android.contacts.list.ContactListFilter; import com.android.contacts.list.ContactListFilterController; import com.android.contacts.list.ContactTileAdapter.DisplayType; import com.android.contacts.list.ContactTileFrequentFragment; import com.android.contacts.list.ContactTileListFragment; import com.android.contacts.list.ContactsIntentResolver; import com.android.contacts.list.ContactsRequest; Loading Loading @@ -145,7 +146,7 @@ public class PeopleActivity extends ContactsActivity */ private DefaultContactBrowseListFragment mAllFragment; private ContactTileListFragment mFavoritesFragment; private ContactTileListFragment mFrequentFragment; private ContactTileFrequentFragment mFrequentFragment; private GroupBrowseListFragment mGroupsFragment; private View mFavoritesView; Loading