private void SetupBottomNavigationView()
        {
            try
            {
                NavigationTabBar = FindViewById <LinearLayout>(Resource.Id.ntb_horizontal);

                FragmentBottomNavigator = new CustomNavigationController(this);
                CardFragment            = new CardMachFragment();
                TrendingFragment        = new TrendingFragment();
                NotificationsFragment   = new NotificationsFragment();
                ProfileFragment         = new ProfileFragment();


                FragmentBottomNavigator.FragmentListTab0.Add(CardFragment);
                FragmentBottomNavigator.FragmentListTab1.Add(TrendingFragment);
                FragmentBottomNavigator.FragmentListTab2.Add(NotificationsFragment);
                //FragmentBottomNavigator.FragmentListTab3.Add(LibraryFragment);
                FragmentBottomNavigator.FragmentListTab4.Add(ProfileFragment);


                FragmentBottomNavigator.ShowFragment0();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Exemplo n.º 2
0
        private void SetupBottomNavigationView()
        {
            try
            {
                NavigationTabBar        = FindViewById <NavigationTabBar>(Resource.Id.ntb_horizontal);
                FragmentBottomNavigator = new FragmentBottomNavigationView(this);

                CardFragment = new CardMachFragment();

                TrendingFragment      = new TrendingFragment();
                NotificationsFragment = new NotificationsFragment();
                ProfileFragment       = new ProfileFragment();

                FragmentBottomNavigator.FragmentListTab0.Add(CardFragment);

                if (AppSettings.ShowTrending)
                {
                    FragmentBottomNavigator.FragmentListTab1.Add(TrendingFragment);
                }

                FragmentBottomNavigator.FragmentListTab2.Add(NotificationsFragment);
                FragmentBottomNavigator.FragmentListTab4.Add(ProfileFragment);

                FragmentBottomNavigator.SetupNavigation(NavigationTabBar);
                NavigationTabBar.SetModelIndex(0, true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                Methods.App.FullScreenApp(this);
                SetTheme(AppSettings.SetTabDarkTheme ? Resource.Style.MyTheme_Dark_Base : Resource.Style.MyTheme_Base);

                AddFlagsWakeLock();

                // Create your application here
                SetContentView(Resource.Layout.TabbedMainLayout);

                Instance = this;

                TracksCounter = new TracksCounter(this);

                CardFragment          = new CardMachFragment();
                TrendingFragment      = new TrendingFragment();
                NotificationsFragment = new NotificationsFragment();
                ProfileFragment       = new ProfileFragment();

                if (AppSettings.ShowPaypal)
                {
                    InitPayPalPayment = new InitPayPalPayment(this);
                }

                if (AppSettings.ShowInAppBilling)
                {
                    BillingPayment = new InitInAppBillingPayment(this);
                }

                if (AppSettings.EnableAppFree)
                {
                    AppSettings.PremiumSystemEnabled = false;
                }

                //Get Value
                SetupBottomNavigationView();

                GetMyInfoData();

                string type = Intent.GetStringExtra("TypeNotification") ?? "Don't have type";
                if (!string.IsNullOrEmpty(type) && type != "Don't have type")
                {
                    //var result = DbDatabase.Get_data_Login_Credentials();

                    var intent = new Intent(this, typeof(UserProfileActivity));

                    if (type == "got_new_match")
                    {
                        intent.PutExtra("EventPage", "HideButton");
                    }
                    else if (type == "like")
                    {
                        intent.PutExtra("EventPage", "likeAndClose");
                    }
                    else
                    {
                        intent.PutExtra("EventPage", "Close");
                    }

                    intent.PutExtra("DataType", "OneSignal");
                    intent.PutExtra("ItemUser", JsonConvert.SerializeObject(OneSignalNotification.UserData));
                    StartActivity(intent);
                }

                SetService();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }