public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                DrawerLayout.OpenDrawer(GravityCompat.Start);
                return(true);

            case Resource.Id.searchMenuButton:
                IntentUtil.GoToSearch(this);
                return(true);
            }
            return(base.OnOptionsItemSelected(item));
        }
        private void SetUpFab()
        {
            Fab = FindViewById <Android.Widget.RelativeLayout>(Resource.Id.fab);
            var cross = ViewUtil.GetUpwardFAB(this);

            //cross.SetBackgroundColor(new Android.Graphics.Color(ContextCompat.GetColor(this, Android.Resource.Color.White)));

            Fab.AddView(cross);
            Fab.Click += (sender, e) =>
            {
                IntentUtil.GoToCreatePost(this);
                //add layout and tint to layout
            };
        }
Exemplo n.º 3
0
        private async void CheckUserAuth()
        {
            var userService = Resolver.Resolve <IUserService>();
            var profileId   = await userService.GetUserToken();

            if (profileId == null)
            {
                IntentUtil.GoToMain(this);
            }
            else
            {
                IntentUtil.GoToMain(this);
            }
        }
        private void DrawerItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            switch (e.MenuItem.ItemId)
            {
            case Resource.Id.navHome:
                MainViewPager.SetCurrentItem(0, false);
                e.MenuItem.SetChecked(true);
                break;

            case Resource.Id.navTrending:
                e.MenuItem.SetChecked(true);
                MainViewPager.SetCurrentItem(1, false);
                break;

            case Resource.Id.navBoards:
                e.MenuItem.SetChecked(true);
                MainViewPager.SetCurrentItem(2, false);
                break;

            case Resource.Id.navNotificaitons:
                e.MenuItem.SetChecked(true);
                MainViewPager.SetCurrentItem(3, false);
                break;

            case Resource.Id.navSearch:
                IntentUtil.GoToSearch(this);
                break;

            case Resource.Id.navMyProfile:
                IntentUtil.GoToProfile(this);
                break;

            case Resource.Id.navAppInfo:
                IntentUtil.GotToAppInfo(this);
                _trackingService.AppInfoPage();
                break;

            case Resource.Id.navLogout:
                Logout();
                break;
            }

            DrawerLayout.CloseDrawers();
        }
        public static void GoToAboutBoard(Context context, UWBoardView boardView)
        {
            var profileView = boardView.BoardProfileView;

            IntentUtil.GoToAboutProfile(context, profileView);
        }
        public void OnClick(Android.Views.View v)
        {
            string link = null;
            //List<LinkObject> links = _profileDrawerControllerService.GetLinkObjects();
            var getInvolvedLinks = _profileDrawerControllerService.GetGetInvolvedItems();
            var moreLinks        = _profileDrawerControllerService.GetMoreItems();
            var footerLinks      = _profileDrawerControllerService.GetFooterItems();

            switch (v.Id)
            {
            case Resource.Id.find_a_league:
                link = getInvolvedLinks[0].Url;
                break;

            case Resource.Id.volunteer:
                //link = "http://www.upward.org/getinvolved/volunteer";
                link = getInvolvedLinks[1].Url;
                break;

            case Resource.Id.donate:
                //link = "http://www.upward.org/foundation";
                link = getInvolvedLinks[2].Url;
                break;

            case Resource.Id.about_upward:
                //link = "http://www.upward.org/about";
                link = moreLinks[0].Url;
                break;

            case Resource.Id.contact_us:
                //link = "http://www.upward.org/about/contactus";
                link = moreLinks[1].Url;
                break;

            case Resource.Id.drawerPrivacyPolicy:
                link = footerLinks[0].Url;
                break;

            case Resource.Id.drawerTermsAndConditions:
                link = footerLinks[1].Url;
                break;

            case Resource.Id.drawerFanreactTechnologies:
                //link = footerLinks[2].Url;
                //break;
                IntentUtil.GoToLoginPage(this);
                return;

            case Resource.Id.flDrawerNonAuthenticatedHeader_AvatarContainer:
                IntentUtil.GoToSignup(this);
                return;

            case Resource.Id.drawerAuthenticatedHeader:
                var profileId = (long)v.Tag;
                IntentUtil.GoToProfile(this, (int)profileId);
                break;

            default:
                link = null;
                break;
            }
            if (link != null)
            {
                ViewUtil.GoToLink(this, link, true);
            }
        }
 private void GoToAppInfo_Click(object sender, EventArgs e)
 {
     IntentUtil.GotToAppInfo(this);
 }
 private void SignIn_Click(object sender, EventArgs e)
 {
     IntentUtil.GoToLogin(this);
 }
 private void CreateAccount_Click(object sender, EventArgs e)
 {
     IntentUtil.GoToSignup(this);
 }