Exemple #1
0
        private void SetupTables()
        {
            _userTableSource = new FollowTableViewSource(_searchFacade.UserFriendPresenter, usersTable);
            _userTableSource.ScrolledToBottom += GetItems;
            _userTableSource.CellAction       += CellAction;
            usersTable.Source          = _userTableSource;
            usersTable.AllowsSelection = false;
            usersTable.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
            usersTable.LayoutMargins   = UIEdgeInsets.Zero;
            usersTable.RegisterClassForCellReuse(typeof(FollowViewCell), nameof(FollowViewCell));
            usersTable.RegisterNibForCellReuse(UINib.FromName(nameof(FollowViewCell), NSBundle.MainBundle), nameof(FollowViewCell));
            usersTable.RegisterClassForCellReuse(typeof(LoaderCell), nameof(LoaderCell));
            usersTable.RowHeight = 70f;
            usersTable.ShowsVerticalScrollIndicator = false;

            var _tagsSource = new TagsTableViewSource(_searchFacade.TagsPresenter, tagsTable, true);

            _tagsSource.CellAction   += CellAction;
            tagsTable.Source          = _tagsSource;
            tagsTable.AllowsSelection = false;
            tagsTable.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
            tagsTable.LayoutMargins   = UIEdgeInsets.Zero;
            tagsTable.RegisterClassForCellReuse(typeof(TagTableViewCell), nameof(TagTableViewCell));
            tagsTable.RegisterNibForCellReuse(UINib.FromName(nameof(TagTableViewCell), NSBundle.MainBundle), nameof(TagTableViewCell));
            tagsTable.RowHeight = 65f;
            tagsTable.ShowsVerticalScrollIndicator = false;
        }
        private void SetupTable()
        {
            _usersTable        = new UITableView();
            _usersTable.Hidden = true;
            View.AddSubview(_usersTable);

            _usersTable.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, _recepientTextField, 25);
            _usersTable.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom);
            _usersTable.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _usersTable.AutoPinEdgeToSuperviewEdge(ALEdge.Right);

            _userTableSource = new FollowTableViewSource(_transferFacade.UserFriendPresenter, _usersTable, true);
            _userTableSource.ScrolledToBottom += GetItems;
            _userTableSource.CellAction       += CellAction;
            _usersTable.Source          = _userTableSource;
            _usersTable.AllowsSelection = false;
            _usersTable.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
            _usersTable.LayoutMargins   = UIEdgeInsets.Zero;
            _usersTable.RegisterClassForCellReuse(typeof(FollowViewCell), nameof(FollowViewCell));
            _usersTable.RegisterNibForCellReuse(UINib.FromName(nameof(FollowViewCell), NSBundle.MainBundle), nameof(FollowViewCell));
            _usersTable.RegisterClassForCellReuse(typeof(LoaderCell), nameof(LoaderCell));
            _usersTable.RowHeight = 70f;

            _usersLoader = new UIActivityIndicatorView();
            _usersLoader.ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.WhiteLarge;
            _usersLoader.Color            = Constants.R231G72B0;
            _usersLoader.HidesWhenStopped = true;
            _usersLoader.StopAnimating();
            View.AddSubview(_usersLoader);

            _userLoaderHorizontalAlignment = _usersLoader.AutoAlignAxis(ALAxis.Horizontal, _usersTable);
            _usersLoader.AutoAlignAxis(ALAxis.Vertical, _usersTable);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var tableSource = new FollowTableViewSource(_presenter, followTableView);

            followTableView.Source        = tableSource;
            followTableView.LayoutMargins = UIEdgeInsets.Zero;
            followTableView.RegisterClassForCellReuse(typeof(FollowViewCell), nameof(FollowViewCell));
            followTableView.RegisterNibForCellReuse(UINib.FromName(nameof(FollowViewCell), NSBundle.MainBundle), nameof(FollowViewCell));
            followTableView.RegisterClassForCellReuse(typeof(LoaderCell), nameof(LoaderCell));

            tableSource.ScrolledToBottom += GetItems;
            tableSource.CellAction       += CellAction;

            SetBackButton();
            progressBar.StartAnimating();
            GetItems();
        }
Exemple #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _searchFacade = new SearchFacade();

            _timer = new Timer(OnTimer);

            _userTableSource = new FollowTableViewSource(_searchFacade.UserFriendPresenter, usersTable);
            _userTableSource.ScrolledToBottom += GetItems;
            _userTableSource.CellAction       += CellAction;
            usersTable.Source        = _userTableSource;
            usersTable.LayoutMargins = UIEdgeInsets.Zero;
            usersTable.RegisterClassForCellReuse(typeof(FollowViewCell), nameof(FollowViewCell));
            usersTable.RegisterNibForCellReuse(UINib.FromName(nameof(FollowViewCell), NSBundle.MainBundle), nameof(FollowViewCell));
            usersTable.RegisterClassForCellReuse(typeof(LoaderCell), nameof(LoaderCell));

            var _tagsSource = new TagsTableViewSource(_searchFacade.TagsPresenter);

            _tagsSource.CellAction += CellAction;
            tagsTable.Source        = _tagsSource;
            tagsTable.LayoutMargins = UIEdgeInsets.Zero;
            tagsTable.RegisterClassForCellReuse(typeof(TagTableViewCell), nameof(TagTableViewCell));
            tagsTable.RegisterNibForCellReuse(UINib.FromName(nameof(TagTableViewCell), NSBundle.MainBundle), nameof(TagTableViewCell));
            tagsTable.RowHeight = 65f;

            _searchFacade.UserFriendPresenter.SourceChanged += UserFriendPresenterSourceChanged;
            _searchFacade.TagsPresenter.SourceChanged       += TagsPresenterSourceChanged;

            searchTextField.BecomeFirstResponder();
            searchTextField.Font = Helpers.Constants.Regular14;
            noTagsLabel.Font     = Helpers.Constants.Light27;
            noTagsLabel.Text     = AppSettings.LocalizationManager.GetText(LocalizationKeys.EmptyQuery);

            searchTextField.ShouldReturn   += ShouldReturn;
            searchTextField.EditingChanged += EditingChanged;
            tagsButton.TouchDown           += TagsButtonTap;
            peopleButton.TouchDown         += PeopleButtonTap;

            SwitchSearchType();
            SetBackButton();
        }
Exemple #5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _presenter.VotersType     = _votersType;
            _presenter.SourceChanged += SourceChanged;

            var tableSource = new FollowTableViewSource(_presenter, votersTable);

            votersTable.Source         = tableSource;
            votersTable.SeparatorStyle = UITableViewCellSeparatorStyle.None;
            votersTable.LayoutMargins  = UIEdgeInsets.Zero;
            votersTable.RegisterClassForCellReuse(typeof(FollowViewCell), nameof(FollowViewCell));
            votersTable.RegisterNibForCellReuse(UINib.FromName(nameof(FollowViewCell), NSBundle.MainBundle), nameof(FollowViewCell));
            votersTable.RegisterClassForCellReuse(typeof(LoaderCell), nameof(LoaderCell));

            tableSource.ScrolledToBottom += GetItems;
            tableSource.CellAction       += CellAction;

            SetBackButton();
            progressBar.StartAnimating();
            GetItems();
        }