1. Is there a setting for the red dot of the invitation message?
Gets whether there is currently a new invitation message, Boolean is_notify = Sputils.getinstace (Imapplication.getglobalapplication ()). Getboolean (sputils.is _invite_notiy, False); Iv_contact_notify.setvisibility (is_notify? View.VISIBLE:View.GONE);
2. Registration of changes in contact invitation information broadcast
Private Broadcastreceiver Invitechangedreceiver = new Broadcastreceiver () { @Override public void OnReceive ( Context context, Intent Intent) { //show red dot iv_contact_notify.setvisibility (view.visible); Save Red Dot State Sputils.getinstace (Imapplication.getglobalapplication ()). Save (Sputils.is_invite_notiy, True);} ;
3. Click events for the invitation information entry
Click event for Friend Invitation Ll_contact_invite.setonclicklistener (new View.onclicklistener () {@Overridepublic void OnClick (View v) {// Vanishing red dot iv_contact_notify.setvisibility (view.gone);//save Red Dot State sputils.getinstace (imapplication.getglobalapplication () ). Save (sputils.is_invite_notiy, false);//Jump to the Invitation Information List page Intent intent = new Intent (getactivity (), Inviteacitivity.class) ; Getactivity (). StartActivity (intent);});
Silicon Valley Social 8--contact List page