Example #1
0
        private void MAdapterOnItemClick(object sender, StoryAdapterClickEventArgs e)
        {
            try
            {
                var item = MAdapter.GetItem(e.Position);
                if (item != null)
                {
                    Intent intent = new Intent(Context, typeof(ViewStoryActivity));
                    intent.PutExtra("UserId", item.UserId);
                    intent.PutExtra("DataItem", JsonConvert.SerializeObject(item));
                    Context.StartActivity(intent);

                    item.ProfileIndicator = AppSettings.StoryReadColor;
                    MAdapter.NotifyItemChanged(e.Position);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Example #2
0
        private void StoryAdapter_OnItemClick(object sender, StoryAdapterClickEventArgs adapterClickEvents)
        {
            try
            {
                var position = adapterClickEvents.Position;
                if (position >= 0)
                {
                    var item = StoryAdapter.GetItem(position);
                    if (item != null)
                    {
                        StoryAdapter.Update();

                        var Int = new Intent(Context, typeof(View_Story_Activity));
                        Int.PutExtra("Story", JsonConvert.SerializeObject(item));
                        Int.PutExtra("Story_Position", position.ToString());
                        StartActivity(Int);
                    }
                }
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }