Exemple #1
0
        protected void CombineWith(FrameLayout MainLayout,
                                   int mainLayoutId, ActivityIs curScreen)
        {
            LayoutInflater inflate = (LayoutInflater)GetSystemService(Context.LayoutInflaterService);

            RelativeLayout main = (RelativeLayout)LayoutInflater.Inflate(
                mainLayoutId, null);
            RelativeLayout bottom = (RelativeLayout)LayoutInflater.Inflate(
                Resource.Layout.bottom_bar, null);

            main.SetPadding(0, 0, 0, AdditionalFunctions.ConvertDpToPx(BottomHeightInDps));

            MainLayout.AddView(main, RelativeLayout.LayoutParams.MatchParent,
                               RelativeLayout.LayoutParams.MatchParent);
            MainLayout.AddView(bottom, RelativeLayout.LayoutParams.MatchParent,
                               RelativeLayout.LayoutParams.MatchParent);

            BottomBarClickInit(curScreen);
        }
Exemple #2
0
 private void BottomBarClickInit(ActivityIs curScreen)
 {
     BottomBar = FindViewById <SupportBottomBar>(Resource.Id.bottom_navigation_bar);
     BottomBar.Menu.GetItem((int)curScreen).SetChecked(true);
     BottomBar.NavigationItemSelected += BottomBar_Click;
 }