Ejemplo n.º 1
0
        void CallFragment(List <ResponseModel> model)
        {
            // build transaction, call Fragment and replace the framelayout
            FragmentTransaction transaction = FragmentManager.BeginTransaction();
            MainFragment        frag        = MainFragment.NewInstance(model);

            transaction.Replace(Resource.Id.fl_layout, frag).Commit();
        }
Ejemplo n.º 2
0
    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
        SetContentView(Resource.Layout.layout_mainactivity);

        // create our fragments and initialise them early.
        if (FragmentList == null)
        {
            FragmentList = new Dictionary <string, Fragment>
            {
                { "main", MainFragment.NewInstance() },
                { "bugreport", BugReportFragment.NewInstance() },
                { "settings", SettingsFragment.NewInstance() }
            };
        }

        navigation = FindViewById <BottomNavigationView>(Resource.Id.bottom_nav);
        navigation.SetOnNavigationItemSelectedListener(this);
        navigation.SelectedItemId = Resource.Id.navigation_main;
    }
Ejemplo n.º 3
0
        public bool OnNavigationItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.navigation_songs:
                SupportActionBar.Title = "Login";
                openFragment(LoginFragment.NewInstance());
                break;

            case Resource.Id.navigation_albums:
                SupportActionBar.Title = "MAin";
                openFragment(MainFragment.NewInstance());
                break;

            case Resource.Id.navigation_artists:
                SupportActionBar.Title = "MAin2";
                openFragment(MainFragment.NewInstance());
                break;
            }

            return(true);
        }
Ejemplo n.º 4
0
 public override Fragment GetFragment(int row, int col)
 {
     return(MainFragment.NewInstance(row, col));
 }