public override void OnCreate(Bundle savedInstanceState) { try { base.OnCreate(savedInstanceState); HasOptionsMenu = true; MainContext = LatestResponsePlayerActivity.GetInstance(); CommentClickListener = new AdminResponseCommentClickListener(Activity, "Comment"); } catch (Exception e) { Console.WriteLine(e); } }
public override void SetupDialog(Dialog dialog, int style) { try { base.SetupDialog(dialog, style); View contentView = View.Inflate(Context, Resource.Layout.Style_Bottom_Sheet_Reply, null); dialog.SetContentView(contentView); var layoutParams = (CoordinatorLayout.LayoutParams)((View)contentView.Parent).LayoutParameters; var behavior = layoutParams.Behavior; if (behavior != null && behavior.GetType() == typeof(BottomSheetBehavior)) { ((BottomSheetBehavior)behavior).SetBottomSheetCallback(MBottomSheetBehaviorCallback); } Instance = this; Type = Arguments.GetString("Type"); if (Arguments.ContainsKey("Object")) { Comment = JsonConvert.DeserializeObject <CommentObject>(Arguments.GetString("Object")); } if (Type == "video") { ActivityContext = LatestResponsePlayerActivity.GetInstance(); } InitComponent(contentView); SetRecyclerViewAdapters(); CommentClickListener = new ResponseCommentClickListener(ActivityContext, "Reply"); SendButton.Click += SendButton_Click; LikeButton.Click += OnLikeButtonClick; UnLikeButton.Click += OnUnLikeButtonClick; UnLikeButton.Visibility = ViewStates.Gone; LoadReplies(); } catch (Exception e) { Console.WriteLine(e); } }
public AdminResponseCommentClickListener(Activity context, string typeClass) { Context = context; MainContext = LatestResponsePlayerActivity.GetInstance(); TypeClass = typeClass; }