Example #1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);

            var view = inflater.Inflate(Resource.Layout.IFCLayout, container, false);

            LinearLayout small16LL = view.FindViewById<LinearLayout> (Resource.Id.ifcSmall16LinearLayout1);
            small16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                QuoteListViewFragment qlvf = new QuoteListViewFragment();
                qlvf.location = "IFC";
                qlvf.model = "Small16";
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                qlvf.Show(transaction, "ifcSmall16ListView");
            };

            ImageButton quoteButton1 = view.FindViewById<ImageButton> (Resource.Id.ifcSmall16QuoteButton);
            quoteButton1.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "IFC";
                quoteDialog.model = "Small16";
                quoteDialog.minPrice = 5600;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "ifcSmall16Quote");

            };
            ImageButton quoteButton2 = view.FindViewById<ImageButton> (Resource.Id.ifcSmall64QuoteButton);
            quoteButton2.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "IFC";
                quoteDialog.model = "Small64";
                quoteDialog.minPrice = 6400;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "ifcSmall64Quote");

            };
            ImageButton quoteButton3 = view.FindViewById<ImageButton> (Resource.Id.ifcSmall128QuoteButton);
            quoteButton3.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "IFC";
                quoteDialog.model = "Small128";
                quoteDialog.minPrice = 7200;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "ifcSmall128Quote");

            };
            ImageButton quoteButton4 = view.FindViewById<ImageButton> (Resource.Id.ifcBig16QuoteButton);
            quoteButton4.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "IFC";
                quoteDialog.model = "Big16";
                quoteDialog.minPrice = 6400;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "ifcBig16Quote");

            };
            ImageButton quoteButton5 = view.FindViewById<ImageButton> (Resource.Id.ifcBig64QuoteButton);
            quoteButton5.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "IFC";
                quoteDialog.model = "Big64";
                quoteDialog.minPrice = 7200;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "ifcBig64Quote");

            };
            ImageButton quoteButton6 = view.FindViewById<ImageButton> (Resource.Id.ifcBig128QuoteButton);
            quoteButton6.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "IFC";
                quoteDialog.model = "Big128";
                quoteDialog.minPrice = 8100;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "ifcBig128Quote");

            };

            return view;
        }
Example #2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);

            var view = inflater.Inflate(Resource.Layout.STLayout, container, false);

            ImageButton quoteButton1 = view.FindViewById<ImageButton> (Resource.Id.stSmall16QuoteButton);
            quoteButton1.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "ST";
                quoteDialog.model = "Small16";
                quoteDialog.minPrice = 5600;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "stSmall16Quote");

            };
            ImageButton quoteButton2 = view.FindViewById<ImageButton> (Resource.Id.stSmall64QuoteButton);
            quoteButton2.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "ST";
                quoteDialog.model = "Small64";
                quoteDialog.minPrice = 6400;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "stSmall64Quote");

            };
            ImageButton quoteButton3 = view.FindViewById<ImageButton> (Resource.Id.stSmall128QuoteButton);
            quoteButton3.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "ST";
                quoteDialog.model = "Small128";
                quoteDialog.minPrice = 7200;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "stSmall128Quote");

            };
            ImageButton quoteButton4 = view.FindViewById<ImageButton> (Resource.Id.stBig16QuoteButton);
            quoteButton4.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "ST";
                quoteDialog.model = "Big16";
                quoteDialog.minPrice = 6400;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "stBig16Quote");

            };
            ImageButton quoteButton5 = view.FindViewById<ImageButton> (Resource.Id.stBig64QuoteButton);
            quoteButton5.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "ST";
                quoteDialog.model = "Big64";
                quoteDialog.minPrice = 7200;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "stBig64Quote");

            };
            ImageButton quoteButton6 = view.FindViewById<ImageButton> (Resource.Id.stBig128QuoteButton);
            quoteButton6.Click += delegate {

                QuoteFragment quoteDialog = new QuoteFragment();
                quoteDialog.location = "ST";
                quoteDialog.model = "Big128";
                quoteDialog.minPrice = 8100;
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                transaction.AddToBackStack(null);
                quoteDialog.Show(transaction, "stBig128Quote");

            };

            return view;
        }
Example #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //ActionBar.SetDisplayShowCustomEnabled (true);
            //ActionBar.SetCustomView (Resource.Layout.IFCLayout);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            var pager = FindViewById<ViewPager>(Resource.Id.pager);
            var adaptor = new GenericFragmentPagerAdaptor(SupportFragmentManager);

            adaptor.AddFragmentView((i, v, b) =>
                {
                    var view = i.Inflate(Resource.Layout.IFCLayout, v, false);

                    RelativeLayout small16LL = view.FindViewById<RelativeLayout> (Resource.Id.ifcRelativeLayout1);
                    small16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                        QuoteListViewFragment qlvf = new QuoteListViewFragment();
                        qlvf.location = "IFC";
                        qlvf.model = "Small16";
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        qlvf.Show(transaction, "ifcSmall16ListView");
                    };
                    RelativeLayout small64LL = view.FindViewById<RelativeLayout> (Resource.Id.ifcRelativeLayout2);
                    small64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                        QuoteListViewFragment qlvf = new QuoteListViewFragment();
                        qlvf.location = "IFC";
                        qlvf.model = "Small64";
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        qlvf.Show(transaction, "ifcSmall64ListView");
                    };
                    RelativeLayout small128LL = view.FindViewById<RelativeLayout> (Resource.Id.ifcRelativeLayout3);
                    small128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                        QuoteListViewFragment qlvf = new QuoteListViewFragment();
                        qlvf.location = "IFC";
                        qlvf.model = "Small128";
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        qlvf.Show(transaction, "ifcSmall128ListView");
                    };
                    RelativeLayout big16LL = view.FindViewById<RelativeLayout> (Resource.Id.ifcRelativeLayout4);
                    big16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                        QuoteListViewFragment qlvf = new QuoteListViewFragment();
                        qlvf.location = "IFC";
                        qlvf.model = "Big16";
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        qlvf.Show(transaction, "ifcBig16ListView");
                    };
                    RelativeLayout big64LL = view.FindViewById<RelativeLayout> (Resource.Id.ifcRelativeLayout5);
                    big64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                        QuoteListViewFragment qlvf = new QuoteListViewFragment();
                        qlvf.location = "IFC";
                        qlvf.model = "Big64";
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        qlvf.Show(transaction, "ifcBig64ListView");
                    };
                    RelativeLayout big128LL = view.FindViewById<RelativeLayout> (Resource.Id.ifcRelativeLayout6);
                    big128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                        QuoteListViewFragment qlvf = new QuoteListViewFragment();
                        qlvf.location = "IFC";
                        qlvf.model = "Big128";
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        qlvf.Show(transaction, "ifcBig128ListView");
                    };

                    ImageButton quoteButton1 = view.FindViewById<ImageButton> (Resource.Id.ifcSmall16QuoteButton);
                    quoteButton1.Click += delegate {

                        QuoteFragment quoteDialog = new QuoteFragment();
                        quoteDialog.location = "IFC";
                        quoteDialog.model = "Small16";
                        quoteDialog.minPrice = 5600;
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        quoteDialog.Show(transaction, "ifcSmall16Quote");

                    };
                    ImageButton quoteButton2 = view.FindViewById<ImageButton> (Resource.Id.ifcSmall64QuoteButton);
                    quoteButton2.Click += delegate {

                        QuoteFragment quoteDialog = new QuoteFragment();
                        quoteDialog.location = "IFC";
                        quoteDialog.model = "Small64";
                        quoteDialog.minPrice = 6400;
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        quoteDialog.Show(transaction, "ifcSmall64Quote");

                    };
                    ImageButton quoteButton3 = view.FindViewById<ImageButton> (Resource.Id.ifcSmall128QuoteButton);
                    quoteButton3.Click += delegate {

                        QuoteFragment quoteDialog = new QuoteFragment();
                        quoteDialog.location = "IFC";
                        quoteDialog.model = "Small128";
                        quoteDialog.minPrice = 7200;
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        quoteDialog.Show(transaction, "ifcSmall128Quote");

                    };
                    ImageButton quoteButton4 = view.FindViewById<ImageButton> (Resource.Id.ifcBig16QuoteButton);
                    quoteButton4.Click += delegate {

                        QuoteFragment quoteDialog = new QuoteFragment();
                        quoteDialog.location = "IFC";
                        quoteDialog.model = "Big16";
                        quoteDialog.minPrice = 6400;
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        quoteDialog.Show(transaction, "ifcBig16Quote");

                    };
                    ImageButton quoteButton5 = view.FindViewById<ImageButton> (Resource.Id.ifcBig64QuoteButton);
                    quoteButton5.Click += delegate {

                        QuoteFragment quoteDialog = new QuoteFragment();
                        quoteDialog.location = "IFC";
                        quoteDialog.model = "Big64";
                        quoteDialog.minPrice = 7200;
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        quoteDialog.Show(transaction, "ifcBig64Quote");

                    };
                    ImageButton quoteButton6 = view.FindViewById<ImageButton> (Resource.Id.ifcBig128QuoteButton);
                    quoteButton6.Click += delegate {

                        QuoteFragment quoteDialog = new QuoteFragment();
                        quoteDialog.location = "IFC";
                        quoteDialog.model = "Big128";
                        quoteDialog.minPrice = 8100;
                        FragmentTransaction transaction = FragmentManager.BeginTransaction();
                        transaction.AddToBackStack(null);
                        quoteDialog.Show(transaction, "ifcBig128Quote");

                    };

                    return view;
                }
            );

            adaptor.AddFragmentView ((i, v, b) => {
                var view = i.Inflate (Resource.Layout.CBLayout, v, false);

                RelativeLayout small16LL = view.FindViewById<RelativeLayout> (Resource.Id.cbRelativeLayout1);
                small16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "CB";
                    qlvf.model = "Small16";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "cbSmall16ListView");
                };
                RelativeLayout small64LL = view.FindViewById<RelativeLayout> (Resource.Id.cbRelativeLayout2);
                small64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "CB";
                    qlvf.model = "Small64";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "cbSmall64ListView");
                };
                RelativeLayout small128LL = view.FindViewById<RelativeLayout> (Resource.Id.cbRelativeLayout3);
                small128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "CB";
                    qlvf.model = "Small128";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "cbSmall128ListView");
                };
                RelativeLayout big16LL = view.FindViewById<RelativeLayout> (Resource.Id.cbRelativeLayout4);
                big16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "CB";
                    qlvf.model = "Big16";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "cbBig16ListView");
                };
                RelativeLayout big64LL = view.FindViewById<RelativeLayout> (Resource.Id.cbRelativeLayout5);
                big64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "CB";
                    qlvf.model = "Big64";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "cbBig64ListView");
                };
                RelativeLayout big128LL = view.FindViewById<RelativeLayout> (Resource.Id.cbRelativeLayout6);
                big128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "CB";
                    qlvf.model = "Big128";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "cbBig128ListView");
                };

                ImageButton quoteButton1 = view.FindViewById<ImageButton> (Resource.Id.cbSmall16QuoteButton);
                quoteButton1.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "CB";
                    quoteDialog.model = "Small16";
                    quoteDialog.minPrice = 5600;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "cbSmall16Quote");

                };
                ImageButton quoteButton2 = view.FindViewById<ImageButton> (Resource.Id.cbSmall64QuoteButton);
                quoteButton2.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "CB";
                    quoteDialog.model = "Small64";
                    quoteDialog.minPrice = 6400;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "cbSmall64Quote");

                };
                ImageButton quoteButton3 = view.FindViewById<ImageButton> (Resource.Id.cbSmall128QuoteButton);
                quoteButton3.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "CB";
                    quoteDialog.model = "Small128";
                    quoteDialog.minPrice = 7200;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "cbSmall128Quote");

                };
                ImageButton quoteButton4 = view.FindViewById<ImageButton> (Resource.Id.cbBig16QuoteButton);
                quoteButton4.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "CB";
                    quoteDialog.model = "Big16";
                    quoteDialog.minPrice = 6400;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "cbBig16Quote");

                };
                ImageButton quoteButton5 = view.FindViewById<ImageButton> (Resource.Id.cbBig64QuoteButton);
                quoteButton5.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "CB";
                    quoteDialog.model = "Big64";
                    quoteDialog.minPrice = 7200;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "cbBig64Quote");

                };
                ImageButton quoteButton6 = view.FindViewById<ImageButton> (Resource.Id.cbBig128QuoteButton);
                quoteButton6.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "CB";
                    quoteDialog.model = "Big128";
                    quoteDialog.minPrice = 8100;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "cbBig128Quote");

                };

                return view;
            }
            );

            adaptor.AddFragmentView ((i, v, b) => {
                var view = i.Inflate (Resource.Layout.FWLayout, v, false);

                RelativeLayout small16LL = view.FindViewById<RelativeLayout> (Resource.Id.fwRelativeLayout1);
                small16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "FW";
                    qlvf.model = "Small16";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "fwSmall16ListView");
                };
                RelativeLayout small64LL = view.FindViewById<RelativeLayout> (Resource.Id.fwRelativeLayout2);
                small64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "FW";
                    qlvf.model = "Small64";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "fwSmall64ListView");
                };
                RelativeLayout small128LL = view.FindViewById<RelativeLayout> (Resource.Id.fwRelativeLayout3);
                small128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "FW";
                    qlvf.model = "Small128";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "fwSmall128ListView");
                };
                RelativeLayout big16LL = view.FindViewById<RelativeLayout> (Resource.Id.fwRelativeLayout4);
                big16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "FW";
                    qlvf.model = "Big16";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "fwBig16ListView");
                };
                RelativeLayout big64LL = view.FindViewById<RelativeLayout> (Resource.Id.fwRelativeLayout5);
                big64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "FW";
                    qlvf.model = "Big64";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "fwBig64ListView");
                };
                RelativeLayout big128LL = view.FindViewById<RelativeLayout> (Resource.Id.fwRelativeLayout6);
                big128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "FW";
                    qlvf.model = "Big128";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "fwBig128ListView");
                };

                ImageButton quoteButton1 = view.FindViewById<ImageButton> (Resource.Id.fwSmall16QuoteButton);
                quoteButton1.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "FW";
                    quoteDialog.model = "Small16";
                    quoteDialog.minPrice = 5600;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "fwSmall16Quote");

                };
                ImageButton quoteButton2 = view.FindViewById<ImageButton> (Resource.Id.fwSmall64QuoteButton);
                quoteButton2.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "FW";
                    quoteDialog.model = "Small64";
                    quoteDialog.minPrice = 6400;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "fwSmall64Quote");

                };
                ImageButton quoteButton3 = view.FindViewById<ImageButton> (Resource.Id.fwSmall128QuoteButton);
                quoteButton3.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "FW";
                    quoteDialog.model = "Small128";
                    quoteDialog.minPrice = 7200;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "fwSmall128Quote");

                };
                ImageButton quoteButton4 = view.FindViewById<ImageButton> (Resource.Id.fwBig16QuoteButton);
                quoteButton4.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "FW";
                    quoteDialog.model = "Big16";
                    quoteDialog.minPrice = 6400;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "fwBig16Quote");

                };
                ImageButton quoteButton5 = view.FindViewById<ImageButton> (Resource.Id.fwBig64QuoteButton);
                quoteButton5.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "FW";
                    quoteDialog.model = "Big64";
                    quoteDialog.minPrice = 7200;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "fwBig64Quote");

                };
                ImageButton quoteButton6 = view.FindViewById<ImageButton> (Resource.Id.fwBig128QuoteButton);
                quoteButton6.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "FW";
                    quoteDialog.model = "Big128";
                    quoteDialog.minPrice = 8100;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "fwBig128Quote");

                };

                return view;
            }
            );

            adaptor.AddFragmentView ((i, v, b) => {
                var view = i.Inflate (Resource.Layout.STLayout, v, false);

                RelativeLayout small16LL = view.FindViewById<RelativeLayout> (Resource.Id.stRelativeLayout1);
                small16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "ST";
                    qlvf.model = "Small16";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "stSmall16ListView");
                };
                RelativeLayout small64LL = view.FindViewById<RelativeLayout> (Resource.Id.stRelativeLayout2);
                small64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "ST";
                    qlvf.model = "Small64";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "stSmall64ListView");
                };
                RelativeLayout small128LL = view.FindViewById<RelativeLayout> (Resource.Id.stRelativeLayout3);
                small128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "ST";
                    qlvf.model = "Small128";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "stSmall128ListView");
                };
                RelativeLayout big16LL = view.FindViewById<RelativeLayout> (Resource.Id.stRelativeLayout4);
                big16LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "ST";
                    qlvf.model = "Big16";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "stBig16ListView");
                };
                RelativeLayout big64LL = view.FindViewById<RelativeLayout> (Resource.Id.stRelativeLayout5);
                big64LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "ST";
                    qlvf.model = "Big64";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "stBig64ListView");
                };
                RelativeLayout big128LL = view.FindViewById<RelativeLayout> (Resource.Id.stRelativeLayout6);
                big128LL.LongClick += (object sender, View.LongClickEventArgs e) => {
                    QuoteListViewFragment qlvf = new QuoteListViewFragment();
                    qlvf.location = "ST";
                    qlvf.model = "Big128";
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    qlvf.Show(transaction, "stBig128ListView");
                };

                ImageButton quoteButton1 = view.FindViewById<ImageButton> (Resource.Id.stSmall16QuoteButton);
                quoteButton1.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "ST";
                    quoteDialog.model = "Small16";
                    quoteDialog.minPrice = 5600;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "stSmall16Quote");

                };
                ImageButton quoteButton2 = view.FindViewById<ImageButton> (Resource.Id.stSmall64QuoteButton);
                quoteButton2.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "ST";
                    quoteDialog.model = "Small64";
                    quoteDialog.minPrice = 6400;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "stSmall64Quote");

                };
                ImageButton quoteButton3 = view.FindViewById<ImageButton> (Resource.Id.stSmall128QuoteButton);
                quoteButton3.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "ST";
                    quoteDialog.model = "Small128";
                    quoteDialog.minPrice = 7200;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "stSmall128Quote");

                };
                ImageButton quoteButton4 = view.FindViewById<ImageButton> (Resource.Id.stBig16QuoteButton);
                quoteButton4.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "ST";
                    quoteDialog.model = "Big16";
                    quoteDialog.minPrice = 6400;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "stBig16Quote");

                };
                ImageButton quoteButton5 = view.FindViewById<ImageButton> (Resource.Id.stBig64QuoteButton);
                quoteButton5.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "ST";
                    quoteDialog.model = "Big64";
                    quoteDialog.minPrice = 7200;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "stBig64Quote");

                };
                ImageButton quoteButton6 = view.FindViewById<ImageButton> (Resource.Id.stBig128QuoteButton);
                quoteButton6.Click += delegate {

                    QuoteFragment quoteDialog = new QuoteFragment();
                    quoteDialog.location = "ST";
                    quoteDialog.model = "Big128";
                    quoteDialog.minPrice = 8100;
                    FragmentTransaction transaction = FragmentManager.BeginTransaction();
                    transaction.AddToBackStack(null);
                    quoteDialog.Show(transaction, "stBig128Quote");

                };

                return view;

            }
            );

            pager.Adapter = adaptor;
            pager.SetOnPageChangeListener(new ViewPageListenerForActionBar(ActionBar));

            ActionBar.AddTab(pager.GetViewPageTab(this, ActionBar, "IFC"));
            ActionBar.AddTab(pager.GetViewPageTab(this, ActionBar, "CB"));
            ActionBar.AddTab(pager.GetViewPageTab(this, ActionBar, "FW"));
            ActionBar.AddTab(pager.GetViewPageTab(this, ActionBar, "ST"));

            //f1 = new IFCTabFragment ();
            //f2 = new CBTabFragment ();
            //f3 = new FWTabFragment ();
            //f4 = new STTabFragment ();

            mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            mLeftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);

            mLeftDataSet = new List<string>();
            mLeftDataSet.Add ("細16");
            mLeftDataSet.Add ("細64");
            mLeftDataSet.Add ("細128");
            mLeftDataSet.Add ("大16");
            mLeftDataSet.Add ("大64");
            mLeftDataSet.Add ("大128");
            mLeftAdapter = new ArrayAdapter<string> (this, Resource.Layout.TextViewItem, mLeftDataSet);
            mLeftDrawer.Adapter = mLeftAdapter;
            this.ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;

            mDrawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle(
                this,							//Host Activity
                mDrawerLayout,	//DrawerLayout
                Resource.String.opened,		//Opened Message
                Resource.String.closed		//Closed Message
            );
            mDrawerLayout.SetDrawerListener(mDrawerToggle);
            ActionBar.SetHomeButtonEnabled(true);
            ActionBar.SetDisplayShowTitleEnabled(true);
            ActionBar.SetDisplayHomeAsUpEnabled (true);
            mDrawerToggle.SyncState();

            mLeftDrawer.ItemClick += (sender, e) => listItemClicked(e.Position);

            //AddTab("IFC", 0, f1);
            //AddTab("CB", 0, f2);
            //AddTab("FW", 0, f3);
            //AddTab("ST", 0, f4);

            if (bundle != null)
                this.ActionBar.SelectTab(this.ActionBar.GetTabAt(bundle.GetInt("tab")));
        }