protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_bible);
            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);


            var drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            var toggle = new ActionBarDrawerToggle(this, drawer, toolbar,
                                                   Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            var navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);


            var adapter   = new BiblePagerAdapter(SupportFragmentManager);
            var viewPager = (ViewPager)FindViewById(Resource.Id.viewpager);

            viewPager.Adapter = adapter;

            var tabLayout = FindViewById <TabLayout>(Resource.Id.tablayout);

            tabLayout.SetupWithViewPager(viewPager);
        }
Beispiel #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            lastFragments = new List <Android.App.Fragment>();
            description   = DataManager.GetInstance().Description();

            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab);

            fab.Click += FabOnClick;

            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);
            toggle.SyncState();


            var detailsFrag = DescriptionFragment.NewInstance();

            if (currentFragment == null)
            {
                currentFragment = detailsFrag;
            }
            ChangeFragment(currentFragment);

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);
        }
Beispiel #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            var toolbar = FindViewById <V7Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            var drawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawerLayout, toolbar, Resource.String.drawer_open, Resource.String.drawer_close);

            drawerLayout.SetDrawerListener(drawerToggle);
            drawerToggle.SyncState();
            navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
            setupDrawerContent(navigationView);
            //var profile = FindViewById<ImageView>(Resource.Id.imageView1);
            //profile.SetImageResource(Resource.Drawable.person);


            //added newly
            Android.App.FragmentTransaction transaction = this.FragmentManager.BeginTransaction();
            HomeFragment home = new HomeFragment();

            transaction.Replace(Resource.Id.framelayout, home).AddToBackStack(null).Commit();
            //HomeFragment home = new HomeFragment();
            // transaction.Add(Resource.Id.framelayout, home).Commit();
            //SupportActionBar.SetDisplayHomeAsUpEnabled = true;
        }
Beispiel #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            //FloatingActionButton fab = FindViewById<FloatingActionButton>(Resource.Id.fab);
            //fab.Click += FabOnClick;


            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);
            drawer.AddDrawerListener(toggle);
            toggle.SyncState();
            tx             = FindViewById <TextView>(Resource.Id.textView4);
            navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
            navigationView.SetNavigationItemSelectedListener(this);
            progress     = FindViewById <TextView>(Resource.Id.textView5);
            progressBar1 = FindViewById <ProgressBar>(Resource.Id.progressBar1);
            LoadAsync();
            CheckUpdate();
        }
Beispiel #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            DrawerLayout          drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            ActionBarDrawerToggle toggle =
                new ActionBarDrawerToggle(this,
                                          drawer,
                                          toolbar,
                                          Resource.String.navigation_drawer_open,
                                          Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);


            GenerateFragments();

            MobileAds.Initialize(this.ApplicationContext, Sec.InitializeMobileAds);
            ConfigureAdBanner();

            Button btn = FindViewById <Button>(Resource.Id.button1);

            btn.Click += Btn_Click;
        }
Beispiel #6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab);

            fab.Click += FabOnClick;

            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);
            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);

            var notificationBtn = FindViewById <Button>(Resource.Id.notificationBTN);

            notificationBtn.Click += OnScheduleClick;
        }
Beispiel #7
0
        protected override async void OnCreate(Bundle bundle)
        {
            ISharedPreferences       prefs  = PreferenceManager.GetDefaultSharedPreferences(Android.App.Application.Context);
            ISharedPreferencesEditor editor = prefs.Edit();

            if (prefs.GetString("locale", "") == "")
            {
                editor.PutString("locale", "en");
                editor.Apply();
            }
            string loc    = prefs.GetString("locale", "");
            var    locale = new Java.Util.Locale(loc);

            Java.Util.Locale.Default = locale;
            var config = new Android.Content.Res.Configuration {
                Locale = locale
            };

#pragma warning disable CS0618 // Type or member is obsolete
            BaseContext.Resources.UpdateConfiguration(config, metrics: BaseContext.Resources.DisplayMetrics);
#pragma warning restore CS0618 // Type or member is obsolete
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.activity_sceduler);

            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab);
            fab.Click += FabOnClick;


            DrawerLayout          drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);
            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
            navigationView.SetNavigationItemSelectedListener(this);

            apiClient           = new APIClient();
            schedulerCollection = await apiClient.GetScheduleAsync(1);

            schedulerList = schedulerCollection.OrderBy(x => x.Start_date).ToList();

            CreateNotificationChannel();

            schedule = new SfSchedule(this);
            CreateAppointments();
            schedule.ItemsSource  = Orders;
            schedule.ScheduleView = ScheduleView.WeekView;
            schedule.CellTapped  += schedule_ScheduleCellTapped;
            LinearLayout linearLayout = FindViewById <LinearLayout>(Resource.Id.scheduler_p);
            linearLayout.AddView(schedule);
            PushNotif();
        }
Beispiel #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Cheeseknife.Bind(this);
            this.framgments = new List <MvxViewPagerFragmentInfo>();

            this.framgments.Add(new MvxViewPagerFragmentInfo("Home", typeof(TimelineView), typeof(TimelineViewModel)));
            MvxCachingFragmentStatePagerAdapter adapter = new MvxCachingFragmentStatePagerAdapter(this, this.SupportFragmentManager, framgments);

            this.mainViewPage.Adapter = adapter;

            this.drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, this.toolbar,
                                                          Resource.String.drawerOpen, Resource.String.drawerClose);
            this.drawerLayout.AddDrawerListener(this.drawerToggle);
        }
Beispiel #9
0
        /// <summary>
        /// Initializes the navigation bar
        /// </summary>
        private void InitializeNavBar()
        {
            // Setting up Navigation Vieww
            navigationView.SetNavigationItemSelectedListener(this);

            // Setting up toolbar
            Android.Support.V7.Widget.Toolbar toolbar = (Android.Support.V7.Widget.Toolbar)FindViewById(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            // Setting up Navigation Bar Toggles
            Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(
                this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);
            drawer.AddDrawerListener(toggle);
            toggle.SyncState();
        }
Beispiel #10
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            RequestWindowFeature(WindowFeatures.NoTitle);
            RequestWindowFeature(WindowFeatures.IndeterminateProgress);

            SetContentView(Resource.Layout.gil);

            var toolBar = FindViewById <SupportToolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolBar);
            mTitle = (TextView)toolBar.FindViewById(Resource.Id.toolbar_title);
            mLogo  = (ImageView)toolBar.FindViewById(Resource.Id.toolbar_logo);

            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected;

            var drawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawerLayout, toolBar, Resource.String.open_drawer, Resource.String.close_drawer);

            drawerToggle.SyncState();

            string address = Intent.GetStringExtra("mac");

            name = Intent.GetStringExtra("name");

            Bundle args = new Bundle();

            args.PutString("address", address);

            var             transaction = FragmentManager.BeginTransaction();
            FragmentControl fragment    = new FragmentControl();

            fragment.Arguments = args;

            transaction.Replace(Resource.Id.viewpager, fragment).AddToBackStack(null).Commit();
            mTitle.SetText(Resource.String.nav_control);
            mLogo.SetImageResource(Resource.Drawable.ic_consola);

            Toast.MakeText(this, address, ToastLength.Short).Show();

            CheckBt();
            Connect(address);
        }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			SetContentView (Resource.Layout.MySoal_MainPager);

			adapter = new MySoal_ViewPagerAdapter (SupportFragmentManager);

			mDrawerLayout = FindViewById<DrawerLayout> (Resource.Id.myDrawer);
			mDrawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle (this, mDrawerLayout, Resource.String.open_drawer, Resource.String.close_drawer);
			mDrawerLayout.SetDrawerListener (mDrawerToggle);

			leftListView = (LinearLayout)FindViewById (Resource.Id.leftListView);
			lvMMLListed = (ListView)FindViewById (Resource.Id.lvMMLListed);

			pager = FindViewById <ViewPager> (Resource.Id.pager);
			pager.Adapter = adapter;

			tabs = FindViewById<MySoal_SlidingTabScrollView> (Resource.Id.tabs);
			tabs.ViewPager = pager;

			toolbar = FindViewById<Android.Support.V7.Widget.Toolbar> (Resource.Id.app_bar);
			toolbar.SetBackgroundColor (Color.ParseColor ("#F44336"));

			SetSupportActionBar (toolbar);
			SupportActionBar.SetDisplayHomeAsUpEnabled (true);
			SupportActionBar.SetHomeButtonEnabled (true);
			SupportActionBar.SetDisplayShowTitleEnabled (true);

			MenuListItem = new List<LeftMenuListItems> ();

			MenuListItem.Add (new LeftMenuListItems(){ 
				LeftMenuDrawerLabel = "Dashboard",
				LeftMenuDrawerIconID = Resource.Drawable.home3 });
			MenuListItem.Add (new LeftMenuListItems(){ 
				LeftMenuDrawerLabel = "My Soal",
				LeftMenuDrawerIconID = Resource.Drawable.cup2 });
			MenuListItem.Add (new LeftMenuListItems(){ 
				LeftMenuDrawerLabel = "My Health",
				LeftMenuDrawerIconID = Resource.Drawable.heart2 });
			MenuListItem.Add (new LeftMenuListItems(){ 
				LeftMenuDrawerLabel = "My Skool",
				LeftMenuDrawerIconID = Resource.Drawable.shield2 });

			lvMMLListed.Adapter = new MainActivityAdapters (this, MenuListItem);

		}
Beispiel #12
0
 private void InitLeftMenu(Typeface tf)
 {
     _drawerLayout        = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
     _leftDrawer          = FindViewById <RelativeLayout>(Resource.Id.left_drawer);
     _myCardTv            = FindViewById <TextView>(Resource.Id.myCardTV);
     _orderStickerTv      = FindViewById <TextView>(Resource.Id.orderStickerTV);
     _cloudSyncTv         = FindViewById <TextView>(Resource.Id.cloudSyncTV);
     _premiumTv           = FindViewById <TextView>(Resource.Id.premiumTV);
     _aboutTv             = FindViewById <TextView>(Resource.Id.aboutTV);
     _enterTv             = FindViewById <TextView>(Resource.Id.enterTV);
     _enterIv             = FindViewById <ImageView>(Resource.Id.enterIV);
     _myCardTv.Text       = TranslationHelper.GetString("myCard", _ci);
     _orderStickerTv.Text = TranslationHelper.GetString("orderStickerQR", _ci);
     _cloudSyncTv.Text    = TranslationHelper.GetString("cloudSync", _ci);
     _premiumTv.Text      = TranslationHelper.GetString("premium", _ci);
     _aboutTv.Text        = TranslationHelper.GetString("aboutApp", _ci);
     _enterTv.Text        = TranslationHelper.GetString("enter", _ci);
     _myCardTv.SetTypeface(tf, TypefaceStyle.Normal);
     _orderStickerTv.SetTypeface(tf, TypefaceStyle.Normal);
     _cloudSyncTv.SetTypeface(tf, TypefaceStyle.Normal);
     _premiumTv.SetTypeface(tf, TypefaceStyle.Normal);
     _aboutTv.SetTypeface(tf, TypefaceStyle.Normal);
     _enterTv.SetTypeface(tf, TypefaceStyle.Normal);
     // Prevent clicking items laying under it.
     _leftDrawer.Click += (s, e) => { };
     if (_databaseMethods.UserExists())
     {
         _enterIv.RotationY = (float)180;
         _enterTv.Text      = TranslationHelper.GetString("logout", _ci);
     }
     else
     {
         _enterIv.RotationY = (float)0;
     }
     FindViewById <RelativeLayout>(Resource.Id.enterRL).Click        += LoginRlClick;
     FindViewById <RelativeLayout>(Resource.Id.myCardRL).Click       += MyCardClick;
     FindViewById <RelativeLayout>(Resource.Id.orderStickerRL).Click += OrderClick;
     FindViewById <RelativeLayout>(Resource.Id.cloudSyncRL).Click    += CloudSyncClick;
     FindViewById <RelativeLayout>(Resource.Id.premiumRL).Click      += PremiumClick;
     FindViewById <RelativeLayout>(Resource.Id.aboutRL).Click        += AboutClick;
     //button to open Left Drawer
     FindViewById <RelativeLayout>(Resource.Id.leftRL).Click += LeftRlClick;
     _drawerToggle = new NativeClasses.ActionBarDrawerToggle(this, _drawerLayout, Resource.String.openDrawer, Resource.String.closeDrawer);
 }
Beispiel #13
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity = this;
            SyncfusionLicenseProvider.RegisterLicense("NDExOTM3QDMxMzgyZTM0MmUzMFZrM0k1K3BzaklSVVlIMGROOVVVK3dWYnJmUTJYUVNHUTNsMTZVY0d4aUE9");
            Context context = this;

            res = context.Resources;
            SessionManager.SetLocale(res);
            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);
            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);

            GridViewMain = FindViewById <RecyclerView>(Resource.Id.gridView_main);
            GridViewMain.SetLayoutManager(new GridLayoutManager(this, 2));
            LoadProgressBar = FindViewById <ContentLoadingProgressBar>(Resource.Id.load_progress_bar);
            ProgressView    = FindViewById <TextView>(Resource.Id.load_progress_bar_text);
            EncryptView     = FindViewById <TextView>(Resource.Id.load_progress_bar_text_encrypt);
            SyncLayout      = FindViewById <LinearLayout>(Resource.Id.sync_layout);
            FindViewById <ImageButton>(Resource.Id.btn_floating_action).Click += (o, e) =>
            {
                if (SessionManager.User.IsAuthenticated)
                {
                    SyncData();
                }
            };
            Title = res.GetString(Resource.String.app_title);



            // WorkRequest = PeriodicWorkRequest.Builder.From<DownloadsWorker>(TimeSpan.FromMinutes(20)).Build();
        }
Beispiel #14
0
        protected virtual void DrawerSetup(DrawerLayout drawer)
        {
            if (drawer == null)
            {
                return;
            }

            var drawerToggle = new ActionBarDrawerToggle(
                /*activity:*/ this,
                /*drawerLayout:*/ drawer,
                /*toolbar: */ Toolbar,
                OpenDrawerContentDescRes,
                CloseDrawerContentDescRes);

            drawer.AddDrawerListener(drawerToggle);
            drawer.OnDrawerOpened().Subscribe(OnDrawerOpened).ToBeDisposedBy(this);

            drawerToggle.SyncState();
            drawerToggle.ToBeDisposedBy(this);
        }
Beispiel #15
0
        private void SetUpNavigationDrawer()
        {
            drawerLayout = FindViewById <DrawerLayout> (Resource.Id.mainActivityDrawerLayout);

            // Init toolbar
            var toolbar = FindViewById <Toolbar> (Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            SupportActionBar.Title = Resources.GetString(Resource.String.app_name);

            // Attach item selected handler to navigation view
            var navigationView = FindViewById <NavigationView> (Resource.Id.nav_view);

            navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected;

            // Create ActionBarDrawerToggle button and add it to the toolbar
            var drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, Resource.String.drawer_open,
                                                         Resource.String.drawer_close);

            drawerLayout.SetDrawerListener(drawerToggle);
            drawerToggle.SyncState();
        }
Beispiel #16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);

            DAO             = new MarketplaceDatabase().DAO;
            DAO.UserChange += NavigationViewUserChanged;
            DAO.UserChange += PagerFragmentUserChanged;

            SetContentView(Resource.Layout.activity_main);

            toolbar = FindViewById <v7Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            SupportActionBar.Title = "Marketplace";
            SupportActionBar.SetHomeButtonEnabled(true);

            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.navigationDrawerLayout);
            toggle       = new v7Toggle(this, drawerLayout, toolbar, Resource.String.open, Resource.String.close);
            drawerLayout.AddDrawerListener(toggle);
            toggle.SyncState();

            navigationView = FindViewById <NavigationView>(Resource.Id.navigationNavigationView);
            navigationView.SetNavigationItemSelectedListener(this);

            SupportFragmentManager.AddOnBackStackChangedListener(this);
            toolbar.NavigationClick += (sender, e) => OnNavigationClick();

            var dialog = new CallToAutorisationDialogFragment();

            dialog.DialogResultHandler += CallToRegisterDialogFinish;
            dialog.Show(SupportFragmentManager, "MainActivity");

            var pagerFragment = new PagerFragment(DAO);
            v4FragmentTransaction fragmentTransaction = SupportFragmentManager.BeginTransaction();

            fragmentTransaction.Replace(Resource.Id.mainFrameLayout, pagerFragment);
            fragmentTransaction.Commit();
        }
Beispiel #17
0
        /// <summary>
        /// Componentsinits this instance.
        /// </summary>
        private void Componentsinit()
        {
            _drawerLayout   = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            _navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
            var toolbar = FindViewById <V7Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            var drawerToggle = new ActionBarDrawerToggle(this, _drawerLayout, toolbar, Resource.String.drawer_open, Resource.String.drawer_close);

            _drawerLayout.AddDrawerListener(drawerToggle);
            drawerToggle.SyncState();
            SetupDrawerContent(_navigationView);

            _showsFragment  = new ShowsFragment();
            _fameFragment   = new FameFragment();
            _expertFragment = new ExpertFragment();
            _myDogFragment  = new MyDogFragment();

            SupportFragmentManager.BeginTransaction()
            .Replace(Resource.Id.frame_content_container, _showsFragment, "Show window")
            .Commit();
            NavigationHeaderInit();
        }
Beispiel #18
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab);

            fab.Click += FabOnClick;

            DrawerLayout          drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);
            permissionCheck();
            SetupMap();
            setJobScheduler();
        }
Beispiel #19
0
        private void CreateToolbar()
        {
            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            // Init toolbar
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);

            toolbar.SetBackgroundColor(Android.Graphics.Color.Rgb(75, 121, 187));

            // Attach item selected handler to navigation view
            var navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected;


            // Create ActionBarDrawerToggle button and add it to the toolbar
            var drawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawerLayout, toolbar, Resource.String.open_drawer, Resource.String.close_drawer);

            drawerLayout.SetDrawerListener(drawerToggle);

            drawerToggle.SyncState();
        }
        protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Create your application here

			SetContentView (Resource.Layout.add_shows);

			_toolbar = FindViewById<Toolbar> (Resource.Id.toolbar);
			SetSupportActionBar (_toolbar);
			string title;

			if (ParseUser.CurrentUser != null) {
				string myUsername;
				var myUser = ParseUser.CurrentUser;
				if(ParseUser.CurrentUser.Username != null)
				 myUsername = ParseUser.CurrentUser.Username;


				title = "Current user is "+ParseUser.CurrentUser.Username;
			} else {
				title = "Trakker Shows, No User";
			}




			SupportActionBar.Title = title;
			SupportActionBar.SetHomeAsUpIndicator (Resource.Drawable.ic_menu);
			SupportActionBar.SetDisplayHomeAsUpEnabled (true);


            

			_drawerLayout = FindViewById<DrawerLayout> (Resource.Id.drawer_layout);

            ActionBarDrawerToggle dt = new ActionBarDrawerToggle(this, _drawerLayout, _toolbar, Resource.String.app_name , Resource.String.hello);
            _drawerLayout.SetDrawerListener(dt);
            
            var navigationView = FindViewById<NavigationView> (Resource.Id.nav_view);
			if (navigationView != null) {
				setupDrawerContent (navigationView);
			}

            //if (bundle != null)
            //{
            //    _tabPosition = bundle.GetInt("tabPosition");
            //}
            
            setUpTabLayout();
            
		}
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                ISharedPreferences       sharedPreferences = PreferenceManager.GetDefaultSharedPreferences(this);
                ISharedPreferencesEditor editorDevis       = sharedPreferences.Edit();

                IDD = selectionCountDevis() + 1;


                base.OnCreate(savedInstanceState);

                SetContentView(Resource.Layout.ListDevise);
                Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

                SetSupportActionBar(toolbar);
                SupportActionBar.Title = "List Devis";
                toolbar.SetTitleTextColor(Android.Graphics.Color.Rgb(0, 250, 154));
                toolbar.SetBackgroundColor(Android.Graphics.Color.Rgb(27, 49, 71));
                toolbar.Title = "Liste Devis";


                DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
                Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

                drawer.AddDrawerListener(toggle);
                toggle.SyncState();

                NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
                navigationView.SetNavigationItemSelectedListener(this);
                var hederview = navigationView.GetHeaderView(0);

                var imagelogo = hederview.FindViewById <ImageView>(Resource.Id.imageViewnavheaderlogo);

                var EmailHeader = hederview.FindViewById <TextView>(Resource.Id.EmailHeder);

                var NomEntreprise = hederview.FindViewById <TextView>(Resource.Id.NomHeader);

                ads1 = FindViewById <AdView>(Resource.Id.adView1ListDevis);
                ads2 = FindViewById <AdView>(Resource.Id.adView2ListDevis);
                var adRequest1 = new AdRequest.Builder().Build();
                ads1.LoadAd(adRequest1);
                var adRequest2 = new AdRequest.Builder().Build();
                ads2.LoadAd(adRequest2);



                imagelogo.SetImageBitmap(Android.Graphics.BitmapFactory.DecodeByteArray(selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].Logo, 0, selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].Logo.Length));

                EmailHeader.Text = selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].Email;

                NomEntreprise.Text = "Bonjour " + selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].NomClinet;



                var Ajouter = FindViewById <FloatingActionButton>(Resource.Id.floatingActionButton);

                var listDevis = FindViewById <ListView>(Resource.Id.listViewVpsHebergement);


                // List<Facturation.Class.Devis> devis = new List<Class.Devis>() { new Class.Devis("Dev1", "CFAO", "En cours", DateTime.Parse("10-10-2020"), DateTime.Parse("10-11-2020"), 500) };

                if (selectionCountDevis() == 0)
                {
                    listDevis.Adapter = new HomeScreenAdapterDevis(this, selectionlistDevis1());
                }
                else
                {
                    listDevis.Adapter = new HomeScreenAdapterDevis(this, selectionlistDevis());
                }
                listDevis.ItemClick += OnListItemClick;
                Ajouter.Click       += delegate
                {
                    editorDevis.PutInt("IDDevis", selectionCountDevis() + 1);
                    editorDevis.PutString("Entreprise", "Moi");
                    editorDevis.PutString("Emailadmin", sharedPreferences.GetString("Emailadmin", ""));
                    editorDevis.PutString("DateCreation", DateTime.Now.Day + "/" + DateTime.Now.Month + "/" + DateTime.Now.Year);
                    editorDevis.PutString("DateValidite", DateTime.Now.Day + "/" + DateTime.Now.Month + "/" + DateTime.Now.Year);
                    editorDevis.PutString("Article", " ");
                    editorDevis.PutFloat("Qte", 0);
                    editorDevis.PutFloat("Prix", 0);
                    editorDevis.PutString("titre", "Choisier votre client ");
                    editorDevis.PutFloat("Tauxremise", 0);
                    editorDevis.PutString("ImagePath", " ");
                    editorDevis.PutString("Observation", " ");
                    editorDevis.PutString("Emailadmin", sharedPreferences.GetString("Emailadmin", ""));


                    editorDevis.Apply();
                    byte[] t      = null;
                    Intent intent = new Intent(this, typeof(Deviss));
                    intent.PutExtra("ImagePath", t);
                    intent.PutExtra("Emailadmin", Intent.GetStringExtra("Emailadmin"));
                    StartActivity(intent);
                };
            }
            catch (Exception ex)
            {
                Toast.MakeText(this, ex.Message, ToastLength.Long).Show();
            }
        }
Beispiel #22
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            //Permission取得
            const string permission = Manifest.Permission.WriteExternalStorage;
            int          flag       = 0;

            if (CheckSelfPermission(permission) == Permission.Denied)
            {
                ActivityCompat.RequestPermissions(this, new[] { Manifest.Permission.WriteExternalStorage, Manifest.Permission.Camera, Manifest.Permission.ReadExternalStorage }, 0);
            }

            //初期化
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);


            if (CheckSelfPermission(permission) == Permission.Granted)
            {
                Getfromdb();
            }

            // Get our RecyclerView layout:
            mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView);

            //............................................................
            // Layout Manager Setup:

            // Use the built-in linear layout manager:
            mLayoutManager = new LinearLayoutManager(this);

            // Or use the built-in grid layout manager (two horizontal rows):
            // mLayoutManager = new GridLayoutManager

            // Plug the layout manager into the RecyclerView:
            mRecyclerView.SetLayoutManager(mLayoutManager);
            //............................................................
            // Adapter Setup:

            // Create an adapter for the RecyclerView, and pass it the
            // data set (the photo album) to manage:
            mAdapter = new PhotoAlbumAdapter(mPhotoAlbum);


            // Plug the adapter into the RecyclerView:
            mRecyclerView.SetAdapter(mAdapter);

            ItemTouchHelper itemTouchHelper = new
                                              ItemTouchHelper(new SwipeToDeleteCallback(mAdapter));

            itemTouchHelper.AttachToRecyclerView(mRecyclerView);

            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            //floatingactionButton実装
            FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab);

            fab.Click += delegate {
                Intent intent = new Intent(this, typeof(App4.plan_main));
                StartActivity(intent);
            };

            DrawerLayout          drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);
        }
Beispiel #23
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // login check
            var prefs = new AppPreferences(this.ApplicationContext);

            if (prefs.GetUserName().Length == 0)
            {
                var intent = new Intent(this, typeof(LoginActivity));
                StartActivity(intent);
                Finish();
            }

            SetContentView(Resource.Layout.activity_main);

            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);


            _drawerLayout   = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            _navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);


            var nav_header = _navigationView.GetHeaderView(0).FindViewById <TextView>(Resource.Id.navheader_username);

            nav_header.Text = prefs.GetUserName();

            SetSupportActionBar(toolbar);
            var drawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, _drawerLayout, Resource.String.drawer_open,
                                                                                Resource.String.drawer_close);

            _drawerLayout.SetDrawerListener(drawerToggle);
            drawerToggle.SyncState();

            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowTitleEnabled(false);
            SupportActionBar.SetHomeButtonEnabled(true);


            SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu_black_24dp);

            _stackFragment = new Stack <SupportFragment>();

            // add fragments to layout and hide all except for main
            var receiptLotteryMainFragment = new ReceiptLotteryMainFragment();
            var mainFragment = new MainFragment();
            var trans        = SupportFragmentManager.BeginTransaction();

            trans.Add(Resource.Id.fragmentContainer, mainFragment, newFragmentId.ToString());
            trans.Commit();
            newFragmentId++;

            _currFragment = mainFragment;

            _navigationView.NavigationItemSelected += (sender, e) => {
                e.MenuItem.SetChecked(true);
                //react to click here and swap fragments or navigate
                long id = e.MenuItem.ItemId;
                switch (id)
                {
                case Resource.Id.nav_lottery:
                    ShowFragment(receiptLotteryMainFragment);
                    break;

                case Resource.Id.nav_home:
                    ShowFragment(mainFragment);
                    break;

                case Resource.Id.nav_signout:
                    var ap = new AppPreferences(this.ApplicationContext);
                    ap.SaveUserName("");
                    var intent = new Intent(this, typeof(LoginActivity));
                    StartActivity(intent);
                    Finish();
                    break;

                case Resource.Id.nav_yourReceipt:
                    if (itemList != null)
                    {
                        ShowFragment(confirmedListFragment);
                    }
                    else
                    {
                        ShowFragment(mainFragment);
                        Toast.MakeText(ApplicationContext, "Please scan receipt first!", ToastLength.Long).Show();
                    }
                    break;

                    /*
                     * case Resource.Id.nav_about:
                     * var aboutFragment = new AboutFragment();
                     * ShowFragment(aboutFragment);
                     * break;
                     * case Resource.Id.nav_statistics:
                     * var statisticsFragment = new StatisticsFragment();
                     * ShowFragment(statisticsFragment);
                     * break;
                     * case Resource.Id.nav_settings:
                     * var settingsFragment = new SettingsFragment();
                     * ShowFragment(settingsFragment);
                     * break;
                     */
                }

                _drawerLayout.CloseDrawers();
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            ma = Intent.GetStringExtra("Emailadmin");
            ISharedPreferences       sharedPreferences = PreferenceManager.GetDefaultSharedPreferences(this);
            ISharedPreferencesEditor editorDevis       = sharedPreferences.Edit();

            //  CreationDatabase();
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Home);
            //
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);

            toolbar.SetTitleTextColor(Android.Graphics.Color.Rgb(0, 250, 154));
            toolbar.SetBackgroundColor(Android.Graphics.Color.Rgb(27, 49, 71));
            toolbar.Title = "Home";
            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);
            var hederview = navigationView.GetHeaderView(0);

            //var imagelogo = hederview.FindViewById<ImageView>(Resource.Id.imageViewnavheaderlogo);

            //var EmailHeader = hederview.FindViewById<TextView>(Resource.Id.EmailHeder);

            //var NomEntreprise = hederview.FindViewById<TextView>(Resource.Id.NomHeader);
            ads2 = FindViewById <AdView>(Resource.Id.adView2Home);
            ads1 = FindViewById <AdView>(Resource.Id.adView1Home);


            var adRequest1 = new AdRequest.Builder().Build();

            ads1.LoadAd(adRequest1);
            var adRequest2 = new AdRequest.Builder().Build();

            ads2.LoadAd(adRequest2);

            var devisencour = FindViewById <LinearLayout>(Resource.Id.linearLayoutDevisencours);

            var devisvalider = FindViewById <LinearLayout>(Resource.Id.linearLayoutDevisvaliser);

            var facturenonpayer = FindViewById <LinearLayout>(Resource.Id.linearLayoutFacturenonpayer);

            var facturepayer = FindViewById <LinearLayout>(Resource.Id.linearLayoutFacturepayer);

            textView6      = FindViewById <TextView>(Resource.Id.textView6);
            textView6.Text = "Total des Factures Generer";

            devisencour.Click += delegate
            {
                string m      = Intent.GetStringExtra("Emailadmin");
                Intent intent = new Intent(this, typeof(ListDevisEncours));

                intent.PutExtra("Emailadmin", m);
                StartActivity(intent);
            };

            devisvalider.Click += delegate
            {
                string m      = Intent.GetStringExtra("Emailadmin");
                Intent intent = new Intent(this, typeof(ListDevisHome));
                intent.PutExtra("Emailadmin", m);
                StartActivity(intent);
            };

            facturenonpayer.Click += delegate
            {
                string m      = Intent.GetStringExtra("Emailadmin");
                Intent intent = new Intent(this, typeof(Listfacturenonpayer));
                intent.PutExtra("Emailadmin", m);
                StartActivity(intent);
            };

            facturepayer.Click += delegate
            {
                string m      = Intent.GetStringExtra("Emailadmin");
                Intent intent = new Intent(this, typeof(ListactureHome));
                intent.PutExtra("Emailadmin", m);
                StartActivity(intent);
            };

            //imagelogo.SetImageBitmap(Android.Graphics.BitmapFactory.DecodeByteArray(selectionInfoEntreprise(ma)[0].Logo, 0, selectionInfoEntreprise(ma)[0].Logo.Length));

            //EmailHeader.Text = selectionInfoEntreprise(ma)[0].Email;

            //NomEntreprise.Text = "Bonjour " + selectionInfoEntreprise(ma)[0].NomClinet;


            //facturenopaye = FindViewById<LinearLayout>(Resource.Id.linearLayoutfacturenonpaye);

            //facturepaye = FindViewById<LinearLayout>(Resource.Id.linearLayoutFacturePaye);

            //devispaye = FindViewById<LinearLayout>(Resource.Id.linearLayoutDevisPaye);

            //devisnonpaye = FindViewById<LinearLayout>(Resource.Id.linearLayoutDevisnonpaye);

            ////save = FindViewById<Button>(Resource.Id.buttonSauvgarde);

            //facturenopaye.Click += delegate {

            //    Intent intent = new Intent(this, typeof(ListfactureHome));

            //   editorDevis.PutString("Emailadmin",sharedPreferences.GetString("Emailadmin"," "));
            //    editorDevis.Apply();
            //    intent.PutExtra("Facture", "Non payé");

            //    StartActivity(intent);



            //};

            //facturepaye.Click += delegate {

            //    Intent intent = new Intent(this, typeof(ListfactureHome));

            //    editorDevis.PutString("Emailadmin", sharedPreferences.GetString("Emailadmin", " "));
            //    editorDevis.Apply();
            //    intent.PutExtra("Facture", " Payé");

            //    StartActivity(intent);



            //};

            //devisnonpaye.Click += delegate {

            //    Intent intent = new Intent(this, typeof(ListDevisHome));


            //    intent.PutExtra("Devis", "Encours");
            //    editorDevis.PutString("Emailadmin", sharedPreferences.GetString("Emailadmin", " "));
            //    editorDevis.Apply();
            //    StartActivity(intent);



            //};

            //devispaye.Click += delegate {

            //    Intent intent = new Intent(this, typeof(ListDevisHome));

            //    editorDevis.PutString("Emailadmin", sharedPreferences.GetString("Emailadmin", " "));
            //    editorDevis.Apply();
            //    intent.PutExtra("Devis", "Validé");

            //    StartActivity(intent);



            //};
            var texttotalfacture = FindViewById <TextView>(Resource.Id.textViewTotalfacture);
            var textnonpayerfact = FindViewById <TextView>(Resource.Id.textViewtotalfacturenonpyer);
            var textviewpayer    = FindViewById <TextView>(Resource.Id.textViewtotalfacturepayer);
            var texttotaldevis   = FindViewById <TextView>(Resource.Id.textViewtotalDevis);
            var textDevisencours = FindViewById <TextView>(Resource.Id.textViewDevisEncours);
            var textdevivalide   = FindViewById <TextView>(Resource.Id.textViewDevisValider);

            if (selectionCountDevis() > 0)
            {
                texttotaldevis.Text   = Devistotal() + " " + Devise(Intent.GetStringExtra("Emailadmin"));
                textDevisencours.Text = DevisEncour() + " " + Devise(Intent.GetStringExtra("Emailadmin"));
                textdevivalide.Text   = Devisvalide() + " " + Devise(Intent.GetStringExtra("Emailadmin"));
            }
            else
            {
                texttotaldevis.Text   = "0" + " " + Devise(Intent.GetStringExtra("Emailadmin"));
                textDevisencours.Text = "0 " + " " + Devise(Intent.GetStringExtra("Emailadmin"));
                textdevivalide.Text   = "0 " + " " + Devise(Intent.GetStringExtra("Emailadmin"));
            }


            if (selectionCountFacture() > 0)
            {
                texttotalfacture.Text = totalfacture().ToString() + " " + Devise(Intent.GetStringExtra("Emailadmin"));

                textnonpayerfact.Text = totalfacturenonpayer().ToString() + " " + Devise(Intent.GetStringExtra("Emailadmin"));

                textviewpayer.Text = totalfacturepayer().ToString() + " " + Devise(Intent.GetStringExtra("Emailadmin"));
            }
            else
            {
                texttotalfacture.Text = " 0 " + Devise(Intent.GetStringExtra("Emailadmin"));

                textnonpayerfact.Text = " 0 " + Devise(Intent.GetStringExtra("Emailadmin"));

                textviewpayer.Text = " 0 " + Devise(Intent.GetStringExtra("Emailadmin"));
            }
            //}
            //catch (Exception ex)
            //{
            //    Toast.MakeText(this, ex.Message, ToastLength.Long).Show();

            //}
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                ISharedPreferences       sharedPreferences = PreferenceManager.GetDefaultSharedPreferences(this);
                ISharedPreferencesEditor editorDevis       = sharedPreferences.Edit();
                base.OnCreate(savedInstanceState);

                SetContentView(Resource.Layout.ListClient);
                Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

                SetSupportActionBar(toolbar);

                toolbar.SetTitleTextColor(Android.Graphics.Color.Rgb(0, 250, 154));
                toolbar.SetBackgroundColor(Android.Graphics.Color.Rgb(27, 49, 71));
                toolbar.Title = "Liste Clients";

                //this.ActionBar.NavigationMode= ActionBarNavigationMode.Tabs;
                //var tab = this.ActionBar.NewTab();
                //tab.SetText("tabText");
                //tab.SetIcon(Resource.Drawable.abc_ic_ab_back_material);



                //var toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);
                //toolbar.SetTitleTextColor(Android.Graphics.Color.White);
                //toolbar.SetBackgroundColor(Android.Graphics.Color.RoyalBlue);


                DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
                Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

                drawer.AddDrawerListener(toggle);
                toggle.SyncState();

                NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
                navigationView.SetNavigationItemSelectedListener(this);
                var hederview = navigationView.GetHeaderView(0);

                var imagelogo = hederview.FindViewById <ImageView>(Resource.Id.imageViewnavheaderlogo);

                var EmailHeader = hederview.FindViewById <TextView>(Resource.Id.EmailHeder);

                var NomEntreprise = hederview.FindViewById <TextView>(Resource.Id.NomHeader);

                ads1 = FindViewById <AdView>(Resource.Id.adView1Listclient);
                ads2 = FindViewById <AdView>(Resource.Id.adView2Listclient);

                var adRequest1 = new AdRequest.Builder().Build();
                ads1.LoadAd(adRequest1);
                var adRequest2 = new AdRequest.Builder().Build();
                ads2.LoadAd(adRequest2);


                imagelogo.SetImageBitmap(BitmapFactory.DecodeByteArray(selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].Logo, 0, selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].Logo.Length));

                EmailHeader.Text = selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].Email;

                NomEntreprise.Text = "Bonjour " + selectionInfoEntreprise(sharedPreferences.GetString("Emailadmin", ""))[0].NomClinet;


                var Ajouter = FindViewById <FloatingActionButton>(Resource.Id.floatingActionButton);

                var listClients = FindViewById <ListView>(Resource.Id.listViewVpsHebergement);



                listClients.Adapter = new HomeScreenAdapter(this, Clientsinfos());

                listClients.ItemClick += OnListItemClick;

                Ajouter.Click += delegate
                {
                    Intent intent = new Intent(this, typeof(Clientss));

                    StartActivity(intent);
                };
            }catch (Exception ex)
            {
                Toast.MakeText(this, ex.Message, ToastLength.Long).Show();
            }
        }
Beispiel #26
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            DebugEvent("OnCreate");
            DebugEvent("Intent: " + Intent?.ToUri(IntentUriType.None) ?? "(null)");
            //if (savedInstanceState != null) {
            //    DebugEvent("Dumping savedInstanceState");
            //    foreach (var item in savedInstanceState.KeySet()) {
            //        DebugEvent(item + ": " + savedInstanceState.Get(item));
            //    }
            //    DebugEvent("Dumping savedInstanceState End");
            //}

            AppName     = Resources.GetString(R.String.app_name);
            JavaAppName = new Java.Lang.String(AppName);

            base.OnCreate(savedInstanceState);

            serviceStartIntent = new Intent(this, typeof(BgService));

            if (this.Intent.Action == "PREP_VPN")
            {
                VpnServicePrepare();
            }

            if (this.Intent.DataString == "toggle")
            {
                StartServiceWithAction(BgService.Actions.TOGGLE);
                if (Build.VERSION.SdkInt >= BuildVersionCodes.NMr1)
                {
                    var sm = GetSystemService(ShortcutService) as ShortcutManager;
                    sm?.ReportShortcutUsed("toggle");
                }
                this.Finish();
                return;
            }

            bgServiceConn = new ServiceConnection <BgService>(
                connected: (ComponentName name, IBinder service) => {
                if (Service.ShowingActivity != null)
                {
                    Logging.error("BUG?: Service.ShowingActivity != null");
                }
                Service.ShowingActivity         = this;
                Service.ForegroundStateChanged += Service_ForegroundStateChanged;
                InvalidateOptionsMenu();
                curFrag?.OnConnected();
            },
                disconnected: (ComponentName name) => {
                if (Service.ShowingActivity != this)
                {
                    Logging.error("BUG?: Service.ShowingActivity != this");
                }
                Service.ShowingActivity         = null;
                Service.ForegroundStateChanged -= Service_ForegroundStateChanged;
                InvalidateOptionsMenu();
            });

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

            toolbar.TitleFormatted = JavaAppName;

            navigationView = FindViewById <NavigationView>(R.Id.nvView);
            drawer         = FindViewById <DrawerLayout>(R.Id.drawer_layout);

            var drawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle
                                   (this, drawer, toolbar, R.String.drawer_open, R.String.drawer_close);

            drawer.AddDrawerListener(drawerToggle);
            drawerToggle.SyncState();

            if (navigationView.GetHeaderView(0) is LinearLayout la)
            {
                if (la.GetChildAt(0) is TextView tv)
                {
                    var sb      = new StringBuilder(64);
                    var pkgInfo = PackageManager.GetPackageInfo(PackageName, 0);
                    sb.Append(tv.Text).Append(" ").Append(BuildInfo.CurrentVersion);
                    sb.Append("\n").Append(GetString(R.String.naivesocksandroid)).Append(" ").Append(pkgInfo.VersionName).Append(" (").Append(pkgInfo.VersionCode).Append(")");
                    var ssb = new SpannableStringBuilder();
                    ssb.Append(sb.ToString());
                    if (BuildInfo.CurrentBuildText != null)
                    {
                        var start = ssb.Length();
                        ssb.Append('\n');
                        ssb.Append(BuildInfo.CurrentBuildText);
                        var end = ssb.Length();
                        ssb.SetSpan(new RelativeSizeSpan(0.7f), start, end, SpanTypes.ExclusiveExclusive);
                        ssb.SetSpan(new ForegroundColorSpan(new Color(unchecked ((int)0xbbffffff))), start, end, SpanTypes.ExclusiveExclusive);
                    }
                    tv.TextFormatted = ssb;
                }
            }

            navigationView.NavigationItemSelected += NavigationView_NavigationItemSelected;

            if (ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadExternalStorage)
                != Permission.Granted)
            {
                Logging.info("requesting storage read/write permissions...");
                ActivityCompat.RequestPermissions(this, new[] {
                    Manifest.Permission.ReadExternalStorage,
                    Manifest.Permission.WriteExternalStorage
                }, 1);
            }

            //drawer.OpenDrawer(GravityCompat.Start);

            int initNavIndex = Array.IndexOf(drawerStrings, Intent.DataString);

            if (initNavIndex == -1)
            {
                initNavIndex = 0;
            }

            topView.Post(() => {
                // User may have exited from this activity.
                if (isActivityRunning)
                {
                    int menuItemId = drawerIds[initNavIndex];
                    onNavigationItemSelected(navigationView.Menu.FindItem(menuItemId));
                }
            });
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            //try
            //{

            ISharedPreferences       sharedPreferences = PreferenceManager.GetDefaultSharedPreferences(this);
            ISharedPreferencesEditor editorfacture     = sharedPreferences.Edit();

            id = selectionCountFacture() + 1;
            base.OnCreate(savedInstanceState);
            //if (CheckLocationPermission())
            //{

            //    var pathToNewFolder = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/FolderName";
            //    Directory.CreateDirectory(pathToNewFolder);
            //    Toast.MakeText(this, File.Exists(pathToNewFolder).ToString(), ToastLength.Long).Show();
            //}

            SetContentView(Resource.Layout.ListFacture);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);

            toolbar.SetTitleTextColor(Android.Graphics.Color.Rgb(0, 250, 154));
            toolbar.SetBackgroundColor(Android.Graphics.Color.Rgb(27, 49, 71));
            toolbar.Title = "Liste Factures";


            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);

            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);

            var hederview = navigationView.GetHeaderView(0);

            var imagelogo = hederview.FindViewById <ImageView>(Resource.Id.imageViewnavheaderlogo);

            var EmailHeader = hederview.FindViewById <TextView>(Resource.Id.EmailHeder);

            var NomEntreprise = hederview.FindViewById <TextView>(Resource.Id.NomHeader);

            ads1 = FindViewById <AdView>(Resource.Id.adView4ListFacture);
            ads2 = FindViewById <AdView>(Resource.Id.adView5ListFacture);
            var adRequest1 = new AdRequest.Builder().Build();

            ads1.LoadAd(adRequest1);
            var adRequest2 = new AdRequest.Builder().Build();

            ads2.LoadAd(adRequest2);

            ma = Intent.GetStringExtra("Emailadmin");

            imagelogo.SetImageBitmap(BitmapFactory.DecodeByteArray(selectionInfoEntreprise(ma)[0].Logo, 0, selectionInfoEntreprise(ma)[0].Logo.Length));

            EmailHeader.Text = selectionInfoEntreprise(ma)[0].Email;

            NomEntreprise.Text = "Bonjour " + selectionInfoEntreprise(ma)[0].NomClinet;

            var Ajouter = FindViewById <FloatingActionButton>(Resource.Id.floatingActionButton);

            var listFactures = FindViewById <ListView>(Resource.Id.listViewVpsHebergement);

            // List<Facture> facturees = new List<Facture>() { new Facture("fac1", "CFAO", 500, DateTime.Parse("12-08-2015"), "Payé") };


            //if (selectionCountFacture() == 0)
            //{
            //    listFactures.Adapter = new HomeScreenAdapterFacture(this, selectionlistfacture1());

            //}
            //else
            if (selectionCountFacture() > 0)
            {
                listFactures.Adapter = new HomeScreenAdapterFacture(this, selectionlistfacture());
            }


            listFactures.ItemClick += OnListItemClick;



            Ajouter.Click += delegate
            {
                editorfacture.PutInt("IDfacture", selectionCountFacture() + 1);
                editorfacture.PutString("Entreprise", "Moi");
                editorfacture.PutString("Emailadmin", Intent.GetStringExtra("Emailadmin"));
                editorfacture.PutString("DateCreation", DateTime.Now.Day + "/" + DateTime.Now.Month + "/" + DateTime.Now.Year);
                editorfacture.PutString("DateEcheance", DateTime.Now.Day + "/" + DateTime.Now.Month + "/" + DateTime.Now.Year);
                editorfacture.PutString("Article", "");
                editorfacture.PutFloat("Qte", 0);
                editorfacture.PutFloat("Prix", 0);
                editorfacture.PutString("titre", "Choisier votre client ");
                editorfacture.PutFloat("Tauxremise", 0);
                editorfacture.PutString("ImagePath", " ");
                editorfacture.PutString("Observation", " ");
                editorfacture.PutString("Emailadmin", sharedPreferences.GetString("Emailadmin", ""));

                editorfacture.Apply();


                Intent intent = new Intent(this, typeof(Facturee));
                intent.PutExtra("Emailadmin", Intent.GetStringExtra("Emailadmin"));

                byte[] t = null;
                intent.PutExtra("ImagePath", t);

                StartActivity(intent);


                Toast.MakeText(this, id.ToString(), ToastLength.Long).Show();
            };
        }
Beispiel #28
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            Window.SetSoftInputMode(SoftInput.StateHidden);
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.ShoppingList);

            voicePrefs = new ActivityPreferences(this, VOICE_PREFS_NAME);
            CheckVoicePrefs();

            talkBackEnabled = IsTalkBackEnabled();

            if (!talkBackEnabled)
            {
                InitiateNoTalkBackMode();
            }

            listView             = FindViewById <ListView>(Resource.Id.ShopListListView);
            addItemButton        = FindViewById <Button>(Resource.Id.ShopListAddItemButton);
            addItemEditText      = FindViewById <EditText>(Resource.Id.ShopListAddItemEditText);
            removeItemButton     = FindViewById <Button>(Resource.Id.ShopListRemoveItemButton);
            removeAllItemsButton = FindViewById <Button>(Resource.Id.ShopListDeleteAllButton);

            prefs = new ActivityPreferences(this, PREFS_NAME);
            items = prefs.GetPreferencesToList();

            gestureListener            = new GestureListener();
            gestureListener.LeftEvent += GestureLeft;
            gestureDetector            = new GestureDetector(this, gestureListener);

            listAdapter =
                new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleListItemChecked, items);
            listView.Adapter    = listAdapter;
            listView.ChoiceMode = ChoiceMode.Multiple;

            addItemButton.Click        += AddTextBoxProductToList;
            removeItemButton.Click     += RemoveTextBoxProductFromList;
            removeAllItemsButton.Click += RemoveAllItems;

            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.DrawerLayout);
            toolbar      = FindViewById <SupportToolbar>(Resource.Id.Toolbar);
            navView      = FindViewById <NavigationView>(Resource.Id.NavView);

            drawerToggle = new ActionBarDrawerToggle(
                this,
                drawerLayout,
                Resource.String.openDrawer,
                Resource.String.closeDrawer
                );
            drawerLayout.AddDrawerListener(drawerToggle);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
            drawerToggle.SyncState();

            navView.NavigationItemSelected += (sender, e) =>
            {
                switch (e.MenuItem.ItemId)
                {
                case Resource.Id.NavItemShoppingCart:
                    GoToShoppingCart();
                    break;

                case Resource.Id.NavItemShoppingList:
                    OnOptionsItemSelected(e.MenuItem);
                    break;
                }
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);

            // Create your application here
            Toolbar toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);

            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            Android.Support.V7.App.ActionBarDrawerToggle toggle = new Android.Support.V7.App.ActionBarDrawerToggle(
                this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);
            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);

            // Back stack listener
            SupportFragmentManager.BackStackChanged += delegate { RefreshNavViewCheckedItem(); };

            Fragment fragment = SupportFragmentManager.FindFragmentById(Resource.Id.fragment_container);

            // Alerts
            if (WeatherWidgetService.ACTION_SHOWALERTS.Equals(Intent?.Action))
            {
                Fragment newFragment = WeatherNowFragment.NewInstance(Intent.Extras);

                if (fragment == null)
                {
                    fragment = newFragment;
                    // Navigate to WeatherNowFragment
                    // Make sure we exit if location is not home
                    SupportFragmentManager.BeginTransaction()
                    .Replace(Resource.Id.fragment_container, fragment, "notification")
                    .Commit();
                }
                else
                {
                    // Navigate to WeatherNowFragment
                    // Make sure we exit if location is not home
                    SupportFragmentManager.BeginTransaction()
                    .Add(Resource.Id.fragment_container, newFragment)
                    .AddToBackStack(null)
                    .Commit();
                }
            }

            // Check if fragment exists
            if (fragment == null)
            {
                if (Intent.HasExtra("data"))
                {
                    fragment = WeatherNowFragment.NewInstance(Intent.Extras);
                }
                else
                {
                    fragment = new WeatherNowFragment();
                }

                // Navigate to WeatherNowFragment
                SupportFragmentManager.BeginTransaction()
                .Replace(Resource.Id.fragment_container, fragment, "home")
                .Commit();
            }

            if ((bool)Intent?.HasExtra("shortcut-data"))
            {
                using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(
                           new System.IO.StringReader(Intent.GetStringExtra("shortcut-data"))))
                {
                    var locData = LocationData.FromJson(jsonTextReader);

                    // Navigate to WeatherNowFragment
                    Fragment newFragment = WeatherNowFragment.NewInstance(locData);

                    SupportFragmentManager.BeginTransaction()
                    .Replace(Resource.Id.fragment_container, newFragment, "shortcut")
                    .Commit();

                    // Disable navigation
                    toggle.DrawerIndicatorEnabled = false;
                    drawer.SetDrawerLockMode(DrawerLayout.LockModeLockedClosed);
                }
            }

            navigationView.SetCheckedItem(Resource.Id.nav_weathernow);

            Task.Run(Shortcuts.ShortcutCreator.UpdateShortcuts);
        }
Beispiel #30
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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


            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            //For showing back button
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
            SupportActionBar.SetDisplayShowTitleEnabled(false);
            //setting Hamburger icon Here
            SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.cancel);
            //Getting Drawer Layout declared in UI and handling closing and open events
            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            drawerLayout.DrawerOpened += DrawerLayout_DrawerOpened;
            drawerLayout.DrawerClosed += DrawerLayout_DrawerClosed;
            navigationView             = FindViewById <NavigationView>(Resource.Id.nav_view);
            toggle = new Android.Support.V7.App.ActionBarDrawerToggle
                     (
                this,
                drawerLayout,
                Resource.String.str_drawer_open,
                Resource.String.str_drawer_close
                     );
            drawerLayout.AddDrawerListener(toggle);
            //Synchronize the state of the drawer indicator/affordance with the linked DrawerLayout
            toggle.SyncState();
            //Handling click events on Menu items
            navigationView.NavigationItemSelected += (sender, e) =>
            {
                if (previousItem != null)
                {
                    previousItem.SetChecked(false);
                }

                navigationView.SetCheckedItem(e.MenuItem.ItemId);

                previousItem = e.MenuItem;

                switch (e.MenuItem.ItemId)
                {
                case Resource.Id.nav_calander:
                    ListItemClicked(0);
                    break;

                case Resource.Id.nav_reservation:
                    ListItemClicked(1);
                    break;

                case Resource.Id.nav_logout:
                    ListItemClicked(2);
                    break;
                }


                drawerLayout.CloseDrawers();
            };

            var headerView = navigationView.GetHeaderView(0);

            txtName  = headerView.FindViewById <TextView>(Resource.Id.navheader_name);
            txtEmail = headerView.FindViewById <TextView>(Resource.Id.navheader_email);


            getUserData();

            initCalanderView();
        }
Beispiel #31
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_drawer);
            CartItems  = new ItemsList();
            CartOffers = new OffersList();
            SupportFragmentManager.BeginTransaction()
            .Add(Resource.Id.content_frame, new HomeFragment())
            .Commit();
            //Finding toolbar and adding to actionbar
            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            //For showing back button
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
            SupportActionBar.SetDisplayShowTitleEnabled(false);
            //setting Hamburger icon Here
            SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu);
            //Getting Drawer Layout declared in UI and handling closing and open events
            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            drawerLayout.DrawerOpened += DrawerLayout_DrawerOpened;
            drawerLayout.DrawerClosed += DrawerLayout_DrawerClosed;
            navigationView             = FindViewById <NavigationView>(Resource.Id.nav_view);
            toggle = new Android.Support.V7.App.ActionBarDrawerToggle
                     (
                this,
                drawerLayout,
                Resource.String.openDrawer,
                Resource.String.closeDrawer
                     );
            drawerLayout.AddDrawerListener(toggle);
            //Synchronize the state of the drawer indicator/affordance with the linked DrawerLayout
            toggle.SyncState();
            //Handling click events on Menu items
            navigationView.NavigationItemSelected += (sender, e) =>
            {
                if (previousItem != null)
                {
                    previousItem.SetChecked(false);
                }

                navigationView.SetCheckedItem(e.MenuItem.ItemId);

                previousItem = e.MenuItem;

                switch (e.MenuItem.ItemId)
                {
                case Resource.Id.nav_home:
                    ListItemClicked(0);
                    break;

                case Resource.Id.nav_profile:
                    ListItemClicked(1);
                    break;

                case Resource.Id.nav_payment:
                    ListItemClicked(2);
                    break;

                case Resource.Id.nav_FAQ:
                    ListItemClicked(3);
                    break;

                case Resource.Id.nav_contactUs:
                    ListItemClicked(4);
                    break;

                case Resource.Id.nav_logOut:
                    ListItemClicked(5);
                    break;

                case Resource.Id.nav_current_order:
                    ListItemClicked(6);
                    break;

                case Resource.Id.nav_my_orders:
                    ListItemClicked(7);
                    break;

                case Resource.Id.nav_request:
                    ListItemClicked(8);
                    break;
                }

                drawerLayout.CloseDrawers();
            };
        }
Beispiel #32
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")));
        }
Beispiel #33
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            ConfigurationManager.Initialise(PCLAppConfig.FileSystemStream.PortableStream.Current);
            DependencyInjection.RegisterInterfaces();

            cmdOpenCamera           = ConfigurationManager.AppSettings["CmdOpenCamera"];
            cmdTakePhoto            = ConfigurationManager.AppSettings["CmdTakePhoto"];
            cmdOpenCart             = ConfigurationManager.AppSettings["CmdOpenCart"];
            cmdOpenList             = ConfigurationManager.AppSettings["CmdOpenList"];
            cmdHelp                 = ConfigurationManager.AppSettings["CmdHelp"];
            cmdRemind               = ConfigurationManager.AppSettings["CmdRemind"];
            cmdTutorialRequest      = ConfigurationManager.AppSettings["CmdTutorialRequest"];
            cmdTutorialLikeShopLens = ConfigurationManager.AppSettings["CmdTutorialLikeShopLens"];

            userGuidPrefKey = ConfigurationManager.AppSettings["UserGuidPrefKey"];

            shopLensDbContext = ConnectToDatabase();

            prefs = PreferenceManager.GetDefaultSharedPreferences(this);

            talkBackEnabledIntentKey = ConfigurationManager.AppSettings["TalkBackKey"];

            voicePrefs = new ActivityPreferences(this, ConfigurationManager.AppSettings["VoicePrefs"]);
            CheckVoicePrefs();

            talkBackEnabled = IsTalkBackEnabled();

            if (!talkBackEnabled)
            {
                InitiateNoTalkBackMode();
            }

            // Set our view from the "main" layout resource.
            SetContentView(Resource.Layout.Main);
            camera2Frag = Camera2Fragment.NewInstance(this, this);

            if (savedInstanceState == null)
            {
                new Thread(() => { FragmentManager.BeginTransaction().Replace(Resource.Id.container, camera2Frag).Commit(); }
                           ).Start();
            }

            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.DrawerLayout);
            toolbar      = FindViewById <SupportToolbar>(Resource.Id.Toolbar);
            navView      = FindViewById <NavigationView>(Resource.Id.NavView);
            rootView     = FindViewById <CoordinatorLayout>(Resource.Id.root_view);

            drawerToggle = new Android.Support.V7.App.ActionBarDrawerToggle(
                this,
                drawerLayout,
                Resource.String.openDrawer,
                Resource.String.closeDrawer
                );
            drawerLayout.AddDrawerListener(drawerToggle);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
            drawerToggle.SyncState();

            gestureListener            = new GestureListener();
            gestureListener.LeftEvent += GestureLeft;
            gestureDetector            = new GestureDetector(this, gestureListener);

            navView.NavigationItemSelected += (sender, e) =>
            {
                switch (e.MenuItem.ItemId)
                {
                case Resource.Id.NavItemShoppingCart:
                    StartCartIntent();
                    break;

                case Resource.Id.NavItemShoppingList:
                    StartListIntent();
                    break;
                }
            };
        }