Loading res/layout/phone_favorites_menu.xml +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ <Button android:id="@+id/all_contacts_button" android:fontFamily="@string/favorites_menu_all_contacts_font_family" android:onClick="allContactsClick" android:layout_width="wrap_content" android:layout_height="@dimen/favorites_menu_all_contacts_height" android:paddingLeft="@dimen/favorites_menu_padding_horizontal" Loading src/com/android/dialer/DialtactsActivity.java +4 −0 Original line number Diff line number Diff line Loading @@ -1037,6 +1037,10 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return tm.getCallState() != TelephonyManager.CALL_STATE_IDLE; } public void allContactsClick(View v) { onShowAllContacts(); } @Override public void onShowAllContacts() { final Intent intent = new Intent(this, AllContactsActivity.class); Loading src/com/android/dialer/list/PhoneFavoriteFragment.java +1 −19 Original line number Diff line number Diff line Loading @@ -199,7 +199,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen private PhoneFavoriteListView mListView; private View mPhoneFavoritesMenu; private View mContactTileFrame; private TileInteractionTeaserView mTileInteractionTeaserView; Loading Loading @@ -291,16 +290,13 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen mEmptyView = mParentView.findViewById(R.id.phone_no_favorites_view); mPhoneFavoritesMenu = inflater.inflate(R.layout.phone_favorites_menu, mListView, false); prepareFavoritesMenu(mPhoneFavoritesMenu); mContactTileFrame = mParentView.findViewById(R.id.contact_tile_frame); mTileInteractionTeaserView = (TileInteractionTeaserView) inflater.inflate( R.layout.tile_interactions_teaser_view, mListView, false); mAdapter = new PhoneFavoriteMergedAdapter(getActivity(), this, mContactTileAdapter, mCallLogAdapter, mPhoneFavoritesMenu, mTileInteractionTeaserView); mCallLogAdapter, mTileInteractionTeaserView); mTileInteractionTeaserView.setAdapter(mAdapter); Loading Loading @@ -663,18 +659,4 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen fetchCalls(); } /** * Prepares the favorites menu which contains the static label "Speed Dial" and the * "All Contacts" button. Sets the onClickListener for the "All Contacts" button. */ private void prepareFavoritesMenu(View favoritesMenu) { Button allContactsButton = (Button) favoritesMenu.findViewById(R.id.all_contacts_button); // Set the onClick listener for the button to bring up the all contacts view. allContactsButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { showAllContacts(); } }); } } src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java +4 −4 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { private static final int FAVORITES_MENU_ITEM_ID = -3; private final PhoneFavoritesTileAdapter mContactTileAdapter; private final CallLogAdapter mCallLogAdapter; private final View mPhoneFavoritesMenu; private final PhoneFavoriteFragment mFragment; private final TileInteractionTeaserView mTileInteractionTeaserView; Loading Loading @@ -103,7 +102,6 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { PhoneFavoriteFragment fragment, PhoneFavoritesTileAdapter contactTileAdapter, CallLogAdapter callLogAdapter, View phoneFavoritesMenu, TileInteractionTeaserView tileInteractionTeaserView) { final Resources resources = context.getResources(); mContext = context; Loading @@ -114,7 +112,6 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { mObserver = new CustomDataSetObserver(); mCallLogAdapter.registerDataSetObserver(mObserver); mContactTileAdapter.registerDataSetObserver(mObserver); mPhoneFavoritesMenu = phoneFavoritesMenu; mTileInteractionTeaserView = tileInteractionTeaserView; mCallLogQueryHandler = new CallLogQueryHandler(mContext.getContentResolver(), mCallLogQueryHandlerListener); Loading Loading @@ -262,9 +259,12 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { wrapper.addView(view); return wrapper; } else if (position == callLogAdapterCount) { if (convertView == null) { convertView = View.inflate(mContext, R.layout.phone_favorites_menu, null); } // If position is just after the entries in the mCallLogAdapter (most recent call), // return the favorites menu. return mPhoneFavoritesMenu; return convertView; } // Set position to the position of the actual favorite contact in the favorites adapter. Loading Loading
res/layout/phone_favorites_menu.xml +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ <Button android:id="@+id/all_contacts_button" android:fontFamily="@string/favorites_menu_all_contacts_font_family" android:onClick="allContactsClick" android:layout_width="wrap_content" android:layout_height="@dimen/favorites_menu_all_contacts_height" android:paddingLeft="@dimen/favorites_menu_padding_horizontal" Loading
src/com/android/dialer/DialtactsActivity.java +4 −0 Original line number Diff line number Diff line Loading @@ -1037,6 +1037,10 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return tm.getCallState() != TelephonyManager.CALL_STATE_IDLE; } public void allContactsClick(View v) { onShowAllContacts(); } @Override public void onShowAllContacts() { final Intent intent = new Intent(this, AllContactsActivity.class); Loading
src/com/android/dialer/list/PhoneFavoriteFragment.java +1 −19 Original line number Diff line number Diff line Loading @@ -199,7 +199,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen private PhoneFavoriteListView mListView; private View mPhoneFavoritesMenu; private View mContactTileFrame; private TileInteractionTeaserView mTileInteractionTeaserView; Loading Loading @@ -291,16 +290,13 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen mEmptyView = mParentView.findViewById(R.id.phone_no_favorites_view); mPhoneFavoritesMenu = inflater.inflate(R.layout.phone_favorites_menu, mListView, false); prepareFavoritesMenu(mPhoneFavoritesMenu); mContactTileFrame = mParentView.findViewById(R.id.contact_tile_frame); mTileInteractionTeaserView = (TileInteractionTeaserView) inflater.inflate( R.layout.tile_interactions_teaser_view, mListView, false); mAdapter = new PhoneFavoriteMergedAdapter(getActivity(), this, mContactTileAdapter, mCallLogAdapter, mPhoneFavoritesMenu, mTileInteractionTeaserView); mCallLogAdapter, mTileInteractionTeaserView); mTileInteractionTeaserView.setAdapter(mAdapter); Loading Loading @@ -663,18 +659,4 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen fetchCalls(); } /** * Prepares the favorites menu which contains the static label "Speed Dial" and the * "All Contacts" button. Sets the onClickListener for the "All Contacts" button. */ private void prepareFavoritesMenu(View favoritesMenu) { Button allContactsButton = (Button) favoritesMenu.findViewById(R.id.all_contacts_button); // Set the onClick listener for the button to bring up the all contacts view. allContactsButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { showAllContacts(); } }); } }
src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java +4 −4 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { private static final int FAVORITES_MENU_ITEM_ID = -3; private final PhoneFavoritesTileAdapter mContactTileAdapter; private final CallLogAdapter mCallLogAdapter; private final View mPhoneFavoritesMenu; private final PhoneFavoriteFragment mFragment; private final TileInteractionTeaserView mTileInteractionTeaserView; Loading Loading @@ -103,7 +102,6 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { PhoneFavoriteFragment fragment, PhoneFavoritesTileAdapter contactTileAdapter, CallLogAdapter callLogAdapter, View phoneFavoritesMenu, TileInteractionTeaserView tileInteractionTeaserView) { final Resources resources = context.getResources(); mContext = context; Loading @@ -114,7 +112,6 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { mObserver = new CustomDataSetObserver(); mCallLogAdapter.registerDataSetObserver(mObserver); mContactTileAdapter.registerDataSetObserver(mObserver); mPhoneFavoritesMenu = phoneFavoritesMenu; mTileInteractionTeaserView = tileInteractionTeaserView; mCallLogQueryHandler = new CallLogQueryHandler(mContext.getContentResolver(), mCallLogQueryHandlerListener); Loading Loading @@ -262,9 +259,12 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { wrapper.addView(view); return wrapper; } else if (position == callLogAdapterCount) { if (convertView == null) { convertView = View.inflate(mContext, R.layout.phone_favorites_menu, null); } // If position is just after the entries in the mCallLogAdapter (most recent call), // return the favorites menu. return mPhoneFavoritesMenu; return convertView; } // Set position to the position of the actual favorite contact in the favorites adapter. Loading