protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView(Resource.Layout.TenantSearchView3);

            mButtonDislike = FindViewById<Button>(Resource.Id.buttonDislike);
            mButtonDislike.Click += (object sender, EventArgs args) =>{
                //pull up dialog
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                FeaturePopUpController featurePopUp = new FeaturePopUpController();
                featurePopUp.Show(transaction, "do you like fragment");
                featurePopUp.mFeatureSurveyComplete += mFeaturePopUpButton_Click;
            };

            mButtonLike = FindViewById<Button>(Resource.Id.buttonLike);
            mButtonLike.Click += (object sender, EventArgs args) =>{
                //pull up dialog
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                FeaturePopUpController featurePopUp = new FeaturePopUpController();
                featurePopUp.Show(transaction, "do you like fragment");
                featurePopUp.mFeatureSurveyComplete += mFeaturePopUpButton_Click;
            };
            /************TOOLBAR******************************************************/
            _toolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            _drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            _leftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            _rightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            //tag left and right drawer for case statment when clicked
            _leftDrawer.Tag = 0;
            _rightDrawer.Tag = 1;
            //Set action support toolbar with private class variable
            SetSupportActionBar(_toolbar);

            //***********LEFT DATA SET******************************/
            //Left data set, these are the buttons you see when you click on the drawers
            _leftDataSet = new List<string>();
            //my_profile has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.main_menu));
            //log_out has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.log_out));
            _leftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _leftDataSet);
            _leftDrawer.Adapter = _leftAdapter;
            //click event for the left drawer
            this._leftDrawer.ItemClick += LeftDrawerRowClick;

            //***********RIGHT DATA SET******************************/
            _rightDataSet = new List<string>();
            //support has a string in the string xml file in values directory
            _rightDataSet.Add(GetString (Resource.String.help_popup));
            //rentproof has a string in the string xml file in values directory
            _rightDataSet.Add(GetString(Resource.String.support));
            _rightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _rightDataSet);
            _rightDrawer.Adapter = _rightAdapter;
            this._rightDrawer.ItemClick += RightDrawerRowClick;

            //constructor for navigation bar
            _drawerToggle = new NavigationBar(
                this,							//Host Activity
                _drawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );
            //set drawerlistener
            _drawerLayout.SetDrawerListener(_drawerToggle);
            //set home button
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            _drawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);}
                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);}
            }
            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
            //*****************END OF ONCREATE TOOLBAR***********
        }
Esempio n. 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.ReportProfilePageView);
            //Verify that this does not return an empty string or null
            var applicantReportJson = Intent.GetStringExtra ("Applicant");
            //Verify that this does not return null;  If it does, then your something wrong with your Applicant class
            _applicantReport = JsonConvert.DeserializeObject<Applicant> (applicantReportJson);

            FindViewById<TextView>(Resource.Id.txtReportProfilePageCreatedAt).Text = _applicantReport.CreatedAt;
            FindViewById<TextView>(Resource.Id.txtReportProfilePageFirstName).Text = _applicantReport.FirstName;
            FindViewById<TextView>(Resource.Id.txtReportProfilePageLastName).Text = _applicantReport.LastName;
            FindViewById<TextView> (Resource.Id.txtReportProfilePageGender).Text = _applicantReport.Gender;
            FindViewById<TextView>(Resource.Id.txtReportProfilePageDOB).Text = _applicantReport.DateOfBirth;;
            FindViewById<TextView>(Resource.Id.txtReportProfilePageTelephone).Text = _applicantReport.Telephone;
            FindViewById<TextView>(Resource.Id.txtReportProfilePageMobile).Text = _applicantReport.Mobile;
            FindViewById<TextView>(Resource.Id.txtReportProfilePageCountry).Text = _applicantReport.Country;

            //_ProfilePhoto = FindViewById<ImageView>(Resource.Id.imgReportProfilePage);

            var index = Intent.GetIntExtra("index", -1);
            if(index < 0)
            {
                return;
            }

            /************TOOLBAR******************************************************/
            _toolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            _drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            _leftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            _rightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            //tag left and right drawer for case statment when clicked
            _leftDrawer.Tag = 0;
            _rightDrawer.Tag = 1;
            //Set action support toolbar with private class variable
            SetSupportActionBar(_toolbar);

            //***********LEFT DATA SET******************************/
            //Left data set, these are the buttons you see when you click on the drawers
            _leftDataSet = new List<string>();
            //my_profile has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.main_menu));
            //log_out has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.log_out));
            _leftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _leftDataSet);
            _leftDrawer.Adapter = _leftAdapter;
            //click event for the left drawer
            this._leftDrawer.ItemClick += LeftDrawerRowClick;

            //***********RIGHT DATA SET******************************/
            _rightDataSet = new List<string>();
            //support has a string in the string xml file in values directory
            _rightDataSet.Add(GetString (Resource.String.help_popup));
            //rentproof has a string in the string xml file in values directory
            _rightDataSet.Add(GetString(Resource.String.support));
            _rightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _rightDataSet);
            _rightDrawer.Adapter = _rightAdapter;
            this._rightDrawer.ItemClick += RightDrawerRowClick;

            //constructor for navigation bar
            _drawerToggle = new NavigationBar(
                this,							//Host Activity
                _drawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );
            //set drawerlistener
            _drawerLayout.SetDrawerListener(_drawerToggle);
            //set home button
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            _drawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
            //*****************END OF ONCREATE TOOLBAR***********
        }
Esempio n. 3
0
		protected override async void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);

			SetContentView(Resource.Layout.My_BackgroundReports);

			_progressDialog = new ProgressDialog(this);
			_progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
			_progressDialog.SetMessage("Loading Team . . .");
			_progressDialog.Show();

			//If the device is portrait, then show the RecyclerView in a vertical list,
			//else show it in horizontal list.
			_layoutManager = Resources.Configuration.Orientation == Android.Content.Res.Orientation.Portrait 
				? new LinearLayoutManager(this, LinearLayoutManager.Vertical, false) 
				: new LinearLayoutManager(this, LinearLayoutManager.Horizontal, false);

			//Experiement with a GridLayoutManger! You can create some cool looking UI!
			//This create a gridview with 2 rows that scrolls horizontally.
			//            _layoutManager = new GridLayoutManager(this, 2, GridLayoutManager.Horizontal, false);

			//Create a reference to our RecyclerView and set the layout manager;
			_recyclerView = FindViewById<RecyclerView>(Resource.Id.mainActivity_recyclerView);
			_recyclerView.SetLayoutManager(_layoutManager);

			//Get our crew member data. This could be a web service.
			SharedData.CrewManifest = await BackgroundCheck_List_Data.GetAllCrewAsync();

			//Create the adapter for the RecyclerView with our crew data, and set
			//the adapter. Also, wire an event handler for when the user taps on each
			//individual item.
			_adapter = new BackgroundCheckRecyclerViewAdapter(SharedData.CrewManifest, this.Resources);
			_adapter.ItemClick += OnItemClick;
			_recyclerView.SetAdapter(_adapter);

			_progressDialog.Dismiss();

			mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
			mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
			mLeftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
			mRightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);


			mLeftDrawer.Tag = 0;
			mRightDrawer.Tag = 1;

			SetSupportActionBar(mToolbar);


			mLeftDataSet = new List<string>();
			mLeftDataSet.Add(GetString(Resource.String.my_profile));
			mLeftDataSet.Add(GetString(Resource.String.log_out));
			mLeftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mLeftDataSet);
			mLeftDrawer.Adapter = mLeftAdapter;

			//this.mLeftDrawer.ItemClick += mLeftDrawer_ItemClick;
			//this.mRightDrawer.ItemClick += mRightDrawer_ItemClick;

			mRightDataSet = new List<string>();
			mRightDataSet.Add(GetString(Resource.String.drawer_faq));
			mRightDataSet.Add(GetString (Resource.String.support));
			mRightDataSet.Add(GetString(Resource.String.rentproof_summary));
			mRightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mRightDataSet);
			mRightDrawer.Adapter = mRightAdapter;

			mDrawerToggle = new NavigationBar(
				this,							//Host Activity
				mDrawerLayout,					//DrawerLayout
				Resource.String.openDrawer,		//Opened Message
				Resource.String.closeDrawer		//Closed Message
			);

			mDrawerLayout.SetDrawerListener(mDrawerToggle);
			SupportActionBar.SetDisplayHomeAsUpEnabled (true);
			SupportActionBar.SetDisplayShowTitleEnabled(true);
			mDrawerToggle.SyncState();



			if (bundle != null){
				if (bundle.GetString("DrawerState") == "Opened"){
					SupportActionBar.SetTitle(Resource.String.openDrawer);
				}

				else{
					SupportActionBar.SetTitle(Resource.String.closeDrawer);
				}
			}

			else{
				//This is the first the time the activity is ran
				SupportActionBar.SetTitle(Resource.String.closeDrawer);
			}
		}
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView(Resource.Layout.Main_Menu);

            mButtonBackgroundCheck = FindViewById<Button>(Resource.Id.buttonQuery);
            mButtonBackgroundCheck.Click += mButtonBackgroundCheck_Click;

            mButtonMyReview = FindViewById<Button>(Resource.Id.buttonReview);
            mButtonMyReview.Click += mButtonMyReview_Click;

            mButtonMyQueries = FindViewById<Button>(Resource.Id.buttonMyQueries);
            mButtonMyQueries.Click += mButtonMyQueries_Click;

            mButtonMyProfile = FindViewById<Button>(Resource.Id.buttonMyProfile);
            mButtonMyProfile.Click += mButtonMyProfile_Click;

            mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            mLeftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            mRightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            mLeftDrawer.Tag = 0;
            mRightDrawer.Tag = 1;

            SetSupportActionBar(mToolbar);

            mLeftDataSet = new List<string>();
            mLeftDataSet.Add(GetString(Resource.String.my_profile));
            mLeftDataSet.Add(GetString(Resource.String.log_out));
            mLeftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mLeftDataSet);
            mLeftDrawer.Adapter = mLeftAdapter;

            this.mLeftDrawer.ItemClick += mLeftDrawer_ItemClick;
            this.mRightDrawer.ItemClick += mRightDrawer_ItemClick;

            mRightDataSet = new List<string>();
            mRightDataSet.Add(GetString(Resource.String.drawer_faq));
            mRightDataSet.Add(GetString (Resource.String.support));
            mRightDataSet.Add(GetString(Resource.String.rentproof_summary));
            mRightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mRightDataSet);
            mRightDrawer.Adapter = mRightAdapter;

            mDrawerToggle = new NavigationBar(
                this,							//Host Activity
                mDrawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );

            mDrawerLayout.SetDrawerListener(mDrawerToggle);
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            mDrawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView(Resource.Layout.ApplicantInfoInputView);
            _SubmitQueryInfo = FindViewById<Button>(Resource.Id.btntxtApplicantInfoInputSubmit);
            _SubmitQueryInfo.Click += async (sender, e) => {

                var model = new Applicant {

                    FirstName = FindViewById<EditText>(Resource.Id.txtApplicantInfoInputFirstName).Text,
                    LastName = FindViewById<EditText>(Resource.Id.txtApplicantInfoInputLastName).Text,
                    Gender = FindViewById<EditText>(Resource.Id.txtApplicantInfoInputGender).Text,
                    DateOfBirth = FindViewById<EditText>(Resource.Id.txtApplicantInfoInputDateOfBirth).Text,
                    Mobile = FindViewById<EditText>(Resource.Id.txtApplicantInfoInputInputMobile).Text,
                    Country = FindViewById<EditText>(Resource.Id.txtApplicantInfoInputCountry).Text
                };

                try {
                    // create new applicant (applicant is returned with ID)
                    var applicant = await OnFido.API.OnFidoService.CreateApplicant(model);
                    applicant = await OnFido.API.OnFidoService.GetApplicantById(applicant.Id);
                    // pass applicant info to recycler view
                    var applicanInfo = new Intent(this, typeof (ReportMainController));
                    applicanInfo.PutExtra("Applicant",JsonConvert.SerializeObject(applicant));
                    this.StartActivity(applicanInfo);
                    //finish activity
                    Finish();

                } catch (Exception) {
                    throw;
                }
            };

            /************TOOLBAR******************************************************/
            _toolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            _drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            _leftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            _rightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            //tag left and right drawer for case statment when clicked
            _leftDrawer.Tag = 0;
            _rightDrawer.Tag = 1;
            //Set action support toolbar with private class variable
            SetSupportActionBar(_toolbar);

            //***********LEFT DATA SET******************************/
            //Left data set, these are the buttons you see when you click on the drawers
            _leftDataSet = new List<string>();
            //my_profile has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.main_menu));
            //log_out has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.log_out));
            _leftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _leftDataSet);
            _leftDrawer.Adapter = _leftAdapter;
            //click event for the left drawer
            this._leftDrawer.ItemClick += LeftDrawerRowClick;

            //***********RIGHT DATA SET******************************/
            _rightDataSet = new List<string>();
            //support has a string in the string xml file in values directory
            _rightDataSet.Add(GetString (Resource.String.help_popup));
            //rentproof has a string in the string xml file in values directory
            _rightDataSet.Add(GetString(Resource.String.support));
            _rightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _rightDataSet);
            _rightDrawer.Adapter = _rightAdapter;
            this._rightDrawer.ItemClick += RightDrawerRowClick;

            //constructor for navigation bar
            _drawerToggle = new NavigationBar(
                this,							//Host Activity
                _drawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );
            //set drawerlistener
            _drawerLayout.SetDrawerListener(_drawerToggle);
            //set home button
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            _drawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
            //*****************END OF ONCREATE TOO
        }
Esempio n. 6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.ReportListView);

            _applicantReport = JsonConvert.DeserializeObject<Applicant> (Intent.GetStringExtra ("Applicant"));

            _progressDialog = new ProgressDialog(this);
            _progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
            _progressDialog.SetMessage("Loading  . . .");
            _progressDialog.Show();

            //If the device is portrait, then show the RecyclerView in a vertical list,
            //else show it in horizontal list.
            _layoutManager = Resources.Configuration.Orientation == Android.Content.Res.Orientation.Portrait
                ? new LinearLayoutManager(this, LinearLayoutManager.Vertical, false)
                : new LinearLayoutManager(this, LinearLayoutManager.Horizontal, false);

            //Experiement with a GridLayoutManger! You can create some cool looking UI!
            //This create a gridview with 2 rows that scrolls horizontally.
            //            _layoutManager = new GridLayoutManager(this, 2, GridLayoutManager.Horizontal, false);

            //Create a reference to our RecyclerView and set the layout manager;
            _recyclerView = FindViewById<RecyclerView>(Resource.Id.reportRecyclerListView);
            _recyclerView.SetLayoutManager(_layoutManager);

            //Get our crew member data. This could be a web service.

            _reportList.Add (_applicantReport);

            //Create the adapter for the RecyclerView with our crew data, and set
            //the adapter. Also, wire an event handler for when the user taps on each
            //individual item.
            _adapter = new ReportViewAdapter(_reportList,this.Resources);
            _adapter.ItemClick += OnItemClick;
            _recyclerView.SetAdapter(_adapter);

            _progressDialog.Dismiss();

            /************TOOLBAR******************************************************/
            _toolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            _drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            _leftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            _rightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            //tag left and right drawer for case statment when clicked
            _leftDrawer.Tag = 0;
            _rightDrawer.Tag = 1;
            //Set action support toolbar with private class variable
            SetSupportActionBar(_toolbar);

            //***********LEFT DATA SET******************************/
            //Left data set, these are the buttons you see when you click on the drawers
            _leftDataSet = new List<string>();
            //my_profile has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.main_menu));
            //log_out has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.log_out));
            _leftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _leftDataSet);
            _leftDrawer.Adapter = _leftAdapter;
            //click event for the left drawer
            this._leftDrawer.ItemClick += LeftDrawerRowClick;

            //***********RIGHT DATA SET******************************/
            _rightDataSet = new List<string>();
            //support has a string in the string xml file in values directory
            _rightDataSet.Add(GetString (Resource.String.help_popup));
            //rentproof has a string in the string xml file in values directory
            _rightDataSet.Add(GetString(Resource.String.support));
            _rightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _rightDataSet);
            _rightDrawer.Adapter = _rightAdapter;
            this._rightDrawer.ItemClick += RightDrawerRowClick;

            //constructor for navigation bar
            _drawerToggle = new NavigationBar(
                this,							//Host Activity
                _drawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );
            //set drawerlistener
            _drawerLayout.SetDrawerListener(_drawerToggle);
            //set home button
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            _drawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
            //*****************END OF ONCREATE TOOLBAR***********
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            SetContentView (Resource.Layout.my_reviews_screen);

            //items = new string[] { "Vegetables","Fruits","Flower Buds","Legumes","Bulbs","Tubers" };
            //mListAdapter = new ArrayAdapter<String>(this, Android.Resource.Layout.SimpleListItem1, items);

            mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            mLeftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            mRightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            mLeftDrawer.Tag = 0;
            mRightDrawer.Tag = 1;

            SetSupportActionBar(mToolbar);
            //SupportActionBar.SetHomeButtonEnabled(true);
            //SupportActionBar.SetDisplayShowHomeEnabled(true);
            //SupportActionBar.SetDisplayShowTitleEnabled(true);

            mLeftDataSet = new List<string>();
            mLeftDataSet.Add ("My Profile");
            mLeftDataSet.Add ("Logout");
            mLeftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mLeftDataSet);
            mLeftDrawer.Adapter = mLeftAdapter;

            mRightDataSet = new List<string>();
            mRightDataSet.Add ("FAQ");
            mRightDataSet.Add ("Support");
            mRightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mRightDataSet);
            mRightDrawer.Adapter = mRightAdapter;

            mDrawerToggle = new NavigationBar(
                this,							//Host Activity
                mDrawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );

            mDrawerLayout.SetDrawerListener(mDrawerToggle);
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            mDrawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

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

            mButtonPay = FindViewById<Button> (Resource.Id.buttonPay);
            mButtonPay.Click += (object sender, EventArgs args) =>{
                //pull up dialog
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                Purchase_Confirmation paymentConfirmationPopUp = new Purchase_Confirmation();
                paymentConfirmationPopUp.Show(transaction, "purchase confirmation fragment");
                paymentConfirmationPopUp.mPurchaseComplete += mButtonPay_Click;
            };

            mButtonCancelQuery = FindViewById<Button> (Resource.Id.buttonCancel);
            mButtonCancelQuery.Click += (object sender, EventArgs args) => {
                //pull up dialog
                FragmentTransaction transaction = FragmentManager.BeginTransaction ();
                Cancel_Activity cancelScreen = new Cancel_Activity ();
                cancelScreen.Show (transaction, "cancel fragment");
                cancelScreen.mOnCancel += cancelScreen_mOnCancel;
            };

            mToolbar = FindViewById<SupportToolbar> (Resource.Id.toolbar);
            mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            mLeftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            mRightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            mLeftDrawer.Tag = 0;
            mRightDrawer.Tag = 1;

            SetSupportActionBar(mToolbar);

            mLeftDataSet = new List<string>();
            mLeftDataSet.Add ("My Profile");
            mLeftDataSet.Add ("Logout");
            mLeftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mLeftDataSet);
            mLeftDrawer.Adapter = mLeftAdapter;

            mRightDataSet = new List<string>();
            mRightDataSet.Add ("FAQ");
            mRightDataSet.Add ("Support");
            mRightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mRightDataSet);
            mRightDrawer.Adapter = mRightAdapter;

            mDrawerToggle = new NavigationBar(
                this,							//Host Activity
                mDrawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );

            mDrawerLayout.SetDrawerListener(mDrawerToggle);
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            mDrawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
        }
Esempio n. 9
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            //set main_menu xml file in layout directory
            SetContentView(Resource.Layout.MainMenuView);

            //backgroundcheck button
            _btnBackgroundCheck = FindViewById<Button>(Resource.Id.btnMainMenuBackgroundCheck);
            _btnBackgroundCheck.Click += BackgroundCheckClick;

            _btnReviews = FindViewById<Button>(Resource.Id.btnMainMenuReviews);
            _btnReviews.Click += ReviewClick;

            _btnReports = FindViewById<Button>(Resource.Id.btnMainMenuReports);
            _btnReports.Click += ReportsClick;

            _btnTenantSearch = FindViewById<Button>(Resource.Id.btnMainMenuTenantSearch);
            _btnTenantSearch.Click += TenantSearchClick;
            /************TOOLBAR******************************************************/
            _toolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            _drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            _leftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            _rightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            //tag left and right drawer for case statment when clicked
            _leftDrawer.Tag = 0;
            _rightDrawer.Tag = 1;
            //Set action support toolbar with private class variable
            SetSupportActionBar(_toolbar);

            //***********LEFT DATA SET******************************/
            //Left data set, these are the buttons you see when you click on the drawers
            _leftDataSet = new List<string>();
            //my_profile has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.main_menu));
            //log_out has a string in the string xml file in values directory
            _leftDataSet.Add(GetString(Resource.String.log_out));
            _leftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _leftDataSet);
            _leftDrawer.Adapter = _leftAdapter;
            //click event for the left drawer
            this._leftDrawer.ItemClick += LeftDrawerRowClick;

            //***********RIGHT DATA SET******************************/
            _rightDataSet = new List<string>();
            //support has a string in the string xml file in values directory
            _rightDataSet.Add(GetString (Resource.String.help_popup));
            //rentproof has a string in the string xml file in values directory
            _rightDataSet.Add(GetString(Resource.String.support));
            _rightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, _rightDataSet);
            _rightDrawer.Adapter = _rightAdapter;
            this._rightDrawer.ItemClick += RightDrawerRowClick;

            //constructor for navigation bar
            _drawerToggle = new NavigationBar(
                this,							//Host Activity
                _drawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );
            //set drawerlistener
            _drawerLayout.SetDrawerListener(_drawerToggle);
            //set home button
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            _drawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }
            //*****************END OF ONCREATE TOOLBAR***********
        }
Esempio n. 10
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView(Resource.Layout.Tenant_Search3);

            mButtonDislike = FindViewById<Button>(Resource.Id.buttonDislike);
            mButtonDislike.Click += (object sender, EventArgs args) =>{
                //pull up dialog
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                Support_PopUp supportPopUp = new Support_PopUp();
                supportPopUp.Show(transaction, "do you like fragment");
                supportPopUp.mFeatureSurveyComplete += mSupportPopUpButton_Click;
            };

            mButtonLike = FindViewById<Button>(Resource.Id.buttonLike);
            mButtonLike.Click += (object sender, EventArgs args) =>{
                //pull up dialog
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                Support_PopUp supportPopUp = new Support_PopUp();
                supportPopUp.Show(transaction, "do you like fragment");
                supportPopUp.mFeatureSurveyComplete += mSupportPopUpButton_Click;
            };

            mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
            mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            mLeftDrawer = FindViewById<ListView>(Resource.Id.left_drawer);
            mRightDrawer = FindViewById<ListView>(Resource.Id.right_drawer);

            //**************TOOLBAR***************************/
            mLeftDrawer.Tag = 0;
            mRightDrawer.Tag = 1;

            SetSupportActionBar(mToolbar);

            mLeftDataSet = new List<string>();
            mLeftDataSet.Add(GetString(Resource.String.my_profile));
            mLeftDataSet.Add(GetString(Resource.String.log_out));
            mLeftAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mLeftDataSet);
            mLeftDrawer.Adapter = mLeftAdapter;

            this.mLeftDrawer.ItemClick += mLeftDrawer_ItemClick;
            this.mRightDrawer.ItemClick += mRightDrawer_ItemClick;

            mRightDataSet = new List<string>();
            mRightDataSet.Add(GetString(Resource.String.drawer_faq));
            mRightDataSet.Add(GetString (Resource.String.support));
            mRightDataSet.Add(GetString(Resource.String.rentproof_summary));
            mRightAdapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, mRightDataSet);
            mRightDrawer.Adapter = mRightAdapter;

            mDrawerToggle = new NavigationBar(
                this,							//Host Activity
                mDrawerLayout,					//DrawerLayout
                Resource.String.openDrawer,		//Opened Message
                Resource.String.closeDrawer		//Closed Message
            );

            mDrawerLayout.SetDrawerListener(mDrawerToggle);
            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetDisplayShowTitleEnabled(true);
            mDrawerToggle.SyncState();

            if (bundle != null){
                if (bundle.GetString("DrawerState") == "Opened"){
                    SupportActionBar.SetTitle(Resource.String.openDrawer);
                }

                else{
                    SupportActionBar.SetTitle(Resource.String.closeDrawer);
                }
            }

            else{
                //This is the first the time the activity is ran
                SupportActionBar.SetTitle(Resource.String.closeDrawer);
            }

            // Create your application here
        }