예제 #1
0
        public PresenterTools(IViewTools view, IInteractorTools interactor, IRouterTools router, IToolsStylesHolder stylesHolder)
        {
            _interactor   = interactor ?? throw new ArgumentNullException("The interactor can't be a null");
            _router       = router ?? throw new ArgumentNullException("The router can't be a null");
            _view         = view ?? throw new ArgumentNullException("The view can't be a null");
            _stylesHolder = stylesHolder;

            _interactor.Presenter = this;
            _view.Presenter       = this;
        }
예제 #2
0
        public void SetDataSource(List <string> listTools, IToolsStylesHolder stylesHolder)
        {
            (Context as Activity)?.RunOnUiThread(() =>
            {
                _adapter = new CreatePostToolsRecyclerAdapter
                {
                    CellClick    = OnCellClick,
                    ToolsList    = listTools,
                    StylesHolder = stylesHolder,
                    RecyclerView = _holder.ToolsRecyclerView
                };

                _holder.ToolsRecyclerView.SetAdapter(_adapter);
                _holder.ToolsRecyclerView.AddItemDecoration(_decorator);
            });
        }
예제 #3
0
 public ToolsDataSource(List <string> tools, IToolsStylesHolder stylesHolder)
 {
     _tools        = tools;
     _stylesHolder = stylesHolder;
 }
예제 #4
0
 public void SetDataSource(List <string> listTools, IToolsStylesHolder stylesHolder)
 {
     _toolsCollectionView.DataSource = new ToolsDataSource(listTools, stylesHolder);
     _toolsCollectionView.Delegate   = new CustomDelegate(RowSelectedHandler);
     _toolsCollectionView.ReloadData();
 }