public void Refresh()
            {
                // Get new sorted list of Participants
                IParticipantProvider provider = App.GetParticipantProvider();

                mParticipants.Clear();
                foreach (string participantId in _activity.mConversation.Participants)
                {
                    if (participantId.Equals(_activity.GetLayerClient().AuthenticatedUserId))
                    {
                        continue;
                    }
                    IParticipant participant = provider.GetParticipant(participantId);
                    if (participant == null)
                    {
                        continue;
                    }
                    mParticipants.Add(participant);
                }
                mParticipants.Sort();

                // Adjust participant container height
                int height = (int)System.Math.Round((double)mParticipants.Count * _activity.Resources.GetDimensionPixelSize(Resource.Dimension.atlas_secondary_item_height));

                LinearLayout.LayoutParams params_ = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, height);
                _activity.mParticipantRecyclerView.LayoutParameters = params_;

                // Notify changes
                NotifyDataSetChanged();
            }
Esempio n. 2
0
 public static IParticipantProvider GetParticipantProvider()
 {
     if (sParticipantProvider == null)
     {
         sParticipantProvider = sFlavor.GenerateParticipantProvider(sInstance, GetAuthenticationProvider());
     }
     return(sParticipantProvider);
 }
 public override Java.Lang.Object ParseContent(LayerClient layerClient, IParticipantProvider participantProvider, IMessage message)
 {
     return(DoParseContent(layerClient, participantProvider, message));
 }