Silicon Valley Social Media 8-contact list page, Silicon Valley Social Media 8-Contact
1. Is there any red dot setting for the invitation information?
// Obtain whether there is any new invitation information. boolean is_notify = SpUtils. getInstace (IMApplication. getGlobalApplication (). getBoolean (SpUtils. IS_INVITE_NOTIY, false); required (is_notify? View. VISIBLE: View. GONE );
2. Broadcast of registration contact invitation information changes
Private BroadcastReceiver InviteChangedReceiver = new BroadcastReceiver () {@ Override public void onReceive (Context context, Intent intent) {// display the red dot iv_contact_policy.setvisibility (View. VISIBLE); // Save the SpUtils in the red dot state. getInstace (IMApplication. getGlobalApplication ()). save (SpUtils. IS_INVITE_NOTIY, true );}};
3. Click events to invite information entries
// Click Event ll_contact_invite.setOnClickListener (new View. onClickListener () {@ Overridepublic void onClick (View v) {// disappears the red dot iv_contact_policy.setvisibility (View. GONE); // Save the red dot status SpUtils. getInstace (IMApplication. getGlobalApplication ()). save (SpUtils. IS_INVITE_NOTIY, false); // The Intent intent = new Intent (getActivity (), inviteaciti.pdf page appears. class); getActivity (). startActivity (intent );}});