Esempio n. 1
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            base.OnViewCreated(view, savedInstanceState);

            _navigationBarView = view.FindViewById <NavigationBarView>(Resource.Id.fragment_chats_navigation_bar);

            if (StyleHelper.Style.UseLogoInsteadOfConnectionStatus)
            {
                _navigationBarView.SetCenterImage(StyleHelper.Style.LogoIcon, null);
            }

            _createChatFloatButton = view.FindViewById <FloatingActionButton>(Resource.Id.fab_create_chat);
            _chatsRecyclerView     = view.FindViewById <RecyclerView>(Resource.Id.rv_chats_list);

            InitializeRecyclerView();

            _createChatFloatButton.SetCommand(nameof(_createChatFloatButton.Click), ViewModel.CreateChatCommand);

            _swipeLeaveActionViewOptions = new SimpleSwipeActionView.Options
            {
                Width           = Activity.ToPixels(80),
                TextSize        = Activity.ToPixels(14),
                BackgroundColor = Color.Red
            };
            _swipeCloseActionViewOptions = new SimpleSwipeActionView.Options
            {
                Width           = Activity.ToPixels(80),
                TextSize        = Activity.ToPixels(14),
                BackgroundColor = Color.Orange
            };
        }