protected override void OnCreate(Bundle savedInstanceState) { try { base.OnCreate(savedInstanceState); if (Settings.DisplaySize == 1 || Settings.DisplaySize is null) { SetContentView(Resource.Layout.activity_chatlist_normal); statusRoundBackground = Resource.Drawable.status_round_background_normal; } else { SetContentView(Resource.Layout.activity_chatlist_small); statusRoundBackground = Resource.Drawable.status_round_background_small; } MainLayout = FindViewById <ConstraintLayout>(Resource.Id.MainLayout); NoMatch = FindViewById <TextView>(Resource.Id.NoMatch); ChatUserList = FindViewById <ListView>(Resource.Id.ChatUserList); MenuListBg = FindViewById <View>(Resource.Id.MenuListBg); NoofMatches = FindViewById <TextView>(Resource.Id.NoofMatches); RippleMain = FindViewById <View>(Resource.Id.RippleMain); MenuList = FindViewById <ImageButton>(Resource.Id.MenuList); if (Build.VERSION.SdkInt >= BuildVersionCodes.N) { MenuListBg.SetBackgroundResource(statusRoundBackground); } c.view = MainLayout; ChatUserList.ItemClick += ChatUserList_ItemClick; MenuList.Click += MenuList_Click; MenuList.Touch += MenuList_Touch; } catch (Exception ex) { c.ReportErrorSilent(ex.Message + System.Environment.NewLine + ex.StackTrace); } }
void ReleaseDesignerOutlets() { if (BottomConstraint != null) { BottomConstraint.Dispose(); BottomConstraint = null; } if (ChatListBottomSeparator != null) { ChatListBottomSeparator.Dispose(); ChatListBottomSeparator = null; } if (ChatUserList != null) { ChatUserList.Dispose(); ChatUserList = null; } if (MenuList != null) { MenuList.Dispose(); MenuList = null; } if (MenuListBg != null) { MenuListBg.Dispose(); MenuListBg = null; } if (MenuListBgCorner != null) { MenuListBgCorner.Dispose(); MenuListBgCorner = null; } if (NoMatch != null) { NoMatch.Dispose(); NoMatch = null; } if (NoofMatches != null) { NoofMatches.Dispose(); NoofMatches = null; } if (RippleChatList != null) { RippleChatList.Dispose(); RippleChatList = null; } if (RoundBottom != null) { RoundBottom.Dispose(); RoundBottom = null; } if (Snackbar != null) { Snackbar.Dispose(); Snackbar = null; } if (SnackBottomConstraint != null) { SnackBottomConstraint.Dispose(); SnackBottomConstraint = null; } if (SnackTopConstraint != null) { SnackTopConstraint.Dispose(); SnackTopConstraint = null; } }