Beispiel #1
0
        public void ShowRaffle()
        {
            if(!IsFinishing){
                SupportFragmentManager.PopBackStack(null,(int)PopBackStackFlags.Inclusive);

                var fragment =new RaffleRootFragment ();
                fragment.nn_location = GlobalVariable.currentlocation;
                var ft = SupportFragmentManager.BeginTransaction ();
                ft.Replace (Resource.Id.home_content_framelayout, fragment);
                ft.CommitAllowingStateLoss ();
                currentfragment = (global::Android.Support.V4.App.Fragment)fragment;
            }
        }
Beispiel #2
0
 //        //according to differet type show differernt tutorial
 //
 //        public void ShowAboutTutorialFragment(int type){
 //            if(!IsFinishing){
 //                var abouttutorialfragment= new AboutTutorialFragment ();
 //                tutorialframlayout = new FrameLayout (this);
 //                tutorialframlayout.Id = TapUtil.generateViewId ();
 //                RelativeLayout.LayoutParams tutorialparam=new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
 //                tutorialparam.TopMargin = TapUtil.dptodx (50);
 //                tutorialframlayout.LayoutParameters = tutorialparam;
 //
 //                RunOnUiThread (() => {
 //                    SetTitleBarText("Tutorial");
 //                    rootlayout.AddView (tutorialframlayout);
 //                });
 //                var ft = SupportFragmentManager.BeginTransaction ();
 //                ft.Add (tutorialframlayout.Id, abouttutorialfragment);
 //                ft.CommitAllowingStateLoss ();
 //            }
 //
 //        }
 //        public void ShowAboutTutorialFragment(){
 //            if(!IsFinishing){
 //                AboutShowTutorialFragment abouttutorialfragment = new AboutShowTutorialFragment ();
 //
 //                abouttutorialfragmentframelayout = new FrameLayout (this);
 //                abouttutorialfragmentframelayout.Id = TapUtil.generateViewId ();
 //                abouttutorialfragmentframelayout.LayoutParameters = new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.MatchParent, RelativeLayout.LayoutParams.MatchParent);
 //                rootlayout.AddView (abouttutorialfragmentframelayout);
 //
 //                var ft = SupportFragmentManager.BeginTransaction ();
 //                ft.Add (abouttutorialfragmentframelayout.Id, abouttutorialfragment);
 //                ft.AddToBackStack (null);
 //                ft.CommitAllowingStateLoss ();
 //            }
 //        }
 public void InitialFragment(string location)
 {
     if(!IsFinishing){
         var rootfragment=new RaffleRootFragment ();
         rootfragment.nn_location = location;
         currentfragment = rootfragment;
         footerfragment = new FooterFragment ();
         var ft = SupportFragmentManager.BeginTransaction ();
         ft.Add (Resource.Id.home_content_framelayout, currentfragment);
         ft.CommitAllowingStateLoss ();
     }
 }