Example #1
0
        public void init()
        {
            var textFormat = Android.Util.ComplexUnitType.Px;

            _dialog = new ProgressDialog(this);


            //popupBuilder.SetView(_dialog);


            _dialog.SetMessage("Espere por favor...");
            _dialog.SetCancelable(false);
            //_dialog.Show();

            mainLayout     = new RelativeLayout(this);
            relSingup      = new RelativeLayout(this);
            relLogin       = new RelativeLayout(this);
            linearLicencia = new LinearLayout(this);
            linearLogin    = new LinearLayout(this);
            linearSingup   = new LinearLayout(this);
            linearLogo     = new LinearLayout(this);

            imgLogo       = new ImageView(this);
            btnLogin      = new ImageButton(this);
            btnSingUp     = new ImageButton(this);
            btnFacebook   = new ImageButton(this);
            chkLogin      = new CheckBox(this);
            txtLicencia_a = new TextView(this);
            txtLicencia_b = new TextView(this);

            txtlogin_a1 = new TextView(this);
            txtlogin_a2 = new TextView(this);
            txtlogin_b1 = new TextView(this);
            txtlogin_b2 = new TextView(this);
            txtlogin_c1 = new TextView(this);
            txtlogin_c2 = new TextView(this);

            initText(txtlogin_a1, "", "#00c6ff");
            txtlogin_a1.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

            initText(txtlogin_a2, "", "#ffffff");
            txtlogin_a2.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

            initText(txtlogin_b1, "", "#00c6ff");
            txtlogin_b1.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

            initText(txtlogin_b2, "", "#ffffff");
            txtlogin_b2.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

            initText(txtlogin_c1, "", "#00c6ff");
            txtlogin_c1.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

            initText(txtlogin_c2, "", "#ffffff");
            txtlogin_c2.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");


            linearTxta        = new LinearLayout(this);
            linearTxtb        = new LinearLayout(this);
            linearTxtc        = new LinearLayout(this);
            linearContentText = new LinearLayout(this);

            linearTxta.LayoutParameters        = new LinearLayout.LayoutParams(-1, -2);
            linearTxtb.LayoutParameters        = new LinearLayout.LayoutParams(-1, -2);
            linearTxtc.LayoutParameters        = new LinearLayout.LayoutParams(-1, -2);
            linearContentText.LayoutParameters = new LinearLayout.LayoutParams(-1, -2);

            linearTxta.Orientation = Orientation.Horizontal;
            linearTxta.SetGravity(GravityFlags.Center);
            linearTxtb.Orientation = Orientation.Horizontal;
            linearTxtb.SetGravity(GravityFlags.Center);
            linearTxtc.Orientation = Orientation.Horizontal;
            linearTxtc.SetGravity(GravityFlags.Center);

            linearContentText.Orientation = Orientation.Vertical;
            linearContentText.SetGravity(GravityFlags.Center);


            linearTxta.AddView(txtlogin_a1); linearTxta.AddView(txtlogin_a2);
            linearTxtb.AddView(txtlogin_b1); linearTxtb.AddView(txtlogin_b2);
            linearTxtc.AddView(txtlogin_c1); linearTxtc.AddView(txtlogin_c2);

            linearContentText.AddView(linearTxta);
            linearContentText.AddView(linearTxtb);
            linearContentText.AddView(linearTxtc);


            mainLayout.LayoutParameters = new RelativeLayout.LayoutParams(-1, -1);
            Drawable d = new BitmapDrawable(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/afondo.png"), 768, 1024, true));

            mainLayout.SetBackgroundDrawable(d);

            relSingup.LayoutParameters = new RelativeLayout.LayoutParams(-1, -1);
            relLogin.LayoutParameters  = new RelativeLayout.LayoutParams(-1, -1);


            linearLicencia.LayoutParameters = new LinearLayout.LayoutParams(-1, LinearLayout.LayoutParams.WrapContent);
            linearLicencia.Orientation      = Orientation.Horizontal;
            linearLicencia.SetGravity(GravityFlags.Center);

            linearLogin.LayoutParameters = new LinearLayout.LayoutParams(-1, LinearLayout.LayoutParams.WrapContent);
            linearLogin.Orientation      = Orientation.Horizontal;
            linearLogin.SetGravity(GravityFlags.Right);

            linearSingup.LayoutParameters = new LinearLayout.LayoutParams(-1, LinearLayout.LayoutParams.WrapContent);
            linearSingup.Orientation      = Orientation.Vertical;
            linearSingup.SetGravity(GravityFlags.Center);


            linearLogo.LayoutParameters = new LinearLayout.LayoutParams(-1, LinearLayout.LayoutParams.WrapContent);
            linearLogo.Orientation      = Orientation.Vertical;
            linearLogo.SetGravity(GravityFlags.Center);



            txtLicencia_a.Text = "TO REGISTER, ACCEPT THE";
            txtLicencia_a.SetTextSize(textFormat, Configuration.getHeight(25));
            txtLicencia_a.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
            txtLicencia_a.SetTextColor(Color.ParseColor("#ffffff"));
            txtLicencia_b.Text     = " TERMS OF USE";
            txtLicencia_b.Typeface = Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

            txtLicencia_b.SetTextSize(textFormat, Configuration.getHeight(25));
            txtLicencia_b.SetTextColor(Color.ParseColor("#00c6ff"));
            chkLogin.Checked = false;

            chkLogin.SetBackgroundColor(Color.ParseColor("#ffffff"));

            imgLogo.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/logo.png"), Configuration.getWidth(360), Configuration.getHeight(230), true));
            btnLogin.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/login.png"), Configuration.getWidth(210), Configuration.getHeight(60), true));
            btnFacebook.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/signupface.png"), Configuration.getWidth(507), Configuration.getHeight(80), true));
            btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/signupnolisto.png"), Configuration.getWidth(507), Configuration.getHeight(80), true));

            Drawable dc = new BitmapDrawable(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/toregister.png"), Configuration.getWidth(47), Configuration.getHeight(47), true));

            chkLogin.SetBackgroundDrawable(dc);

            initButtonColor(btnLogin);
            initButtonColor(btnFacebook);
            initButtonColor(btnSingUp);
            linearLicencia.AddView(chkLogin);
            linearLicencia.AddView(txtLicencia_a);
            linearLicencia.AddView(txtLicencia_b);

            linearLogin.AddView(btnLogin);
            linearSingup.AddView(linearLicencia);
            linearSingup.AddView(btnSingUp);
            linearSingup.AddView(btnFacebook);

            linearLogo.AddView(imgLogo);

            linearLogo.SetX(0); linearLogo.SetY(Configuration.getHeight(373));
            linearContentText.SetX(0); linearContentText.SetY(Configuration.getHeight(557));
            linearLogin.SetX(0); linearLogin.SetY(Configuration.getHeight(30));
            linearSingup.SetX(0); linearSingup.SetY(Configuration.getHeight(785));

            relSingup.AddView(linearLogo);
            relSingup.AddView(linearContentText);
            relSingup.AddView(linearLogin);
            relSingup.AddView(linearSingup);
            mainLayout.AddView(relSingup);


            btnSingUp.Click += delegate {
                if (chkLogin.Checked == true)
                {
                    var com = ((LoginViewModel)this.DataContext).SignUpCommand;
                    com.Execute(null);
                }
            };


            btnLogin.Click += BtnLogin_Click;

            btnFacebook.Click += async delegate {
                await Authenticate(MobileServiceAuthenticationProvider.Facebook);

                /*var com = ((LoginViewModel)this.DataContext).FacebookLoginCommand;
                 * com.Execute(null);
                 */
            };


            chkLogin.CheckedChange += delegate {
                if (chkLogin.Checked == true)
                {
                    btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/signuplisto.png"), Configuration.getWidth(507), Configuration.getHeight(80), true));
                }
                if (chkLogin.Checked == false)
                {
                    btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/signupnolisto.png"), Configuration.getWidth(507), Configuration.getHeight(80), true));
                }
            };
        }
Example #2
0
		public void init(){



			var textFormat = Android.Util.ComplexUnitType.Px;

			_dialog = new ProgressDialog(this);


			//popupBuilder.SetView(_dialog);


			_dialog.SetMessage("Espere por favor...");
			_dialog.SetCancelable(false);
			//_dialog.Show();

			mainLayout = new RelativeLayout (this);
			relSingup = new RelativeLayout (this);
			relLogin = new RelativeLayout (this);
			linearLicencia = new LinearLayout (this);
			linearLogin = new LinearLayout (this);
			linearSingup = new LinearLayout (this);
			linearLogo = new LinearLayout (this);

			imgLogo = new ImageView (this);
			btnLogin = new ImageButton (this);
			btnSingUp = new ImageButton (this);
			btnFacebook = new ImageButton (this);
			chkLogin = new CheckBox (this);
			txtLicencia_a = new TextView (this);
			txtLicencia_b = new TextView (this);

			txtlogin_a1 = new TextView (this);
			txtlogin_a2 = new TextView (this);
			txtlogin_b1 = new TextView (this);
			txtlogin_b2 = new TextView (this);
			txtlogin_c1 = new TextView (this);
			txtlogin_c2 = new TextView (this);

			initText (txtlogin_a1, "", "#00c6ff");
			txtlogin_a1.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			initText (txtlogin_a2, "", "#ffffff");
			txtlogin_a2.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			initText (txtlogin_b1, "", "#00c6ff");
			txtlogin_b1.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			initText (txtlogin_b2, "","#ffffff");
			txtlogin_b2.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			initText (txtlogin_c1, "", "#00c6ff");
			txtlogin_c1.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			initText (txtlogin_c2, "", "#ffffff");
			txtlogin_c2.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
		

			linearTxta = new LinearLayout (this);
			linearTxtb = new LinearLayout (this);
			linearTxtc = new LinearLayout (this);
			linearContentText = new LinearLayout (this);

			linearTxta.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearTxtb.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearTxtc.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearContentText.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);

			linearTxta.Orientation = Orientation.Horizontal;
			linearTxta.SetGravity (GravityFlags.Center);
			linearTxtb.Orientation = Orientation.Horizontal;
			linearTxtb.SetGravity (GravityFlags.Center);
			linearTxtc.Orientation = Orientation.Horizontal;
			linearTxtc.SetGravity (GravityFlags.Center);

			linearContentText.Orientation = Orientation.Vertical;
			linearContentText.SetGravity (GravityFlags.Center);


			linearTxta.AddView (txtlogin_a1); linearTxta.AddView (txtlogin_a2);
			linearTxtb.AddView (txtlogin_b1); linearTxtb.AddView (txtlogin_b2);
			linearTxtc.AddView (txtlogin_c1); linearTxtc.AddView (txtlogin_c2);

			linearContentText.AddView (linearTxta);
			linearContentText.AddView (linearTxtb);
			linearContentText.AddView (linearTxtc);


			mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
			Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/afondo.png"), 768, 1024, true));
			mainLayout.SetBackgroundDrawable (d);

			relSingup.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
			relLogin.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);


			linearLicencia.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
			linearLicencia.Orientation = Orientation.Horizontal;
			linearLicencia.SetGravity (GravityFlags.Center);

			linearLogin.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
			linearLogin.Orientation = Orientation.Horizontal;
			linearLogin.SetGravity (GravityFlags.Right);

			linearSingup.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
			linearSingup.Orientation = Orientation.Vertical;
			linearSingup.SetGravity (GravityFlags.Center);


			linearLogo.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
			linearLogo.Orientation = Orientation.Vertical;
			linearLogo.SetGravity (GravityFlags.Center);



			txtLicencia_a.Text = "TO REGISTER, ACCEPT THE";
			txtLicencia_a.SetTextSize(textFormat,Configuration.getHeight(25));
			txtLicencia_a.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			txtLicencia_a.SetTextColor (Color.ParseColor ("#ffffff"));
			txtLicencia_b.Text = " TERMS OF USE";
			txtLicencia_b.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			txtLicencia_b.SetTextSize(textFormat,Configuration.getHeight(25));
			txtLicencia_b.SetTextColor (Color.ParseColor ("#00c6ff"));
			chkLogin.Checked = false;

			chkLogin.SetBackgroundColor(Color.ParseColor("#ffffff"));

			imgLogo.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/logo.png"), Configuration.getWidth(360), Configuration.getHeight(230),true));
			btnLogin.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/login.png"), Configuration.getWidth(210), Configuration.getHeight(60),true));
			btnFacebook.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signupface.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));
			btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signupnolisto.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));

			Drawable dc = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/toregister.png"), Configuration.getWidth(47), Configuration.getHeight(47), true));
			chkLogin.SetBackgroundDrawable (dc);

			initButtonColor (btnLogin);
			initButtonColor (btnFacebook);
			initButtonColor (btnSingUp);
			linearLicencia.AddView (chkLogin);
			linearLicencia.AddView (txtLicencia_a);
			linearLicencia.AddView (txtLicencia_b);

			linearLogin.AddView (btnLogin);
			linearSingup.AddView (linearLicencia);
			linearSingup.AddView (btnSingUp);
			linearSingup.AddView (btnFacebook);

			linearLogo.AddView (imgLogo);

			linearLogo.SetX (0); linearLogo.SetY (Configuration.getHeight(373));
			linearContentText.SetX (0); linearContentText.SetY (Configuration.getHeight(557));
			linearLogin.SetX (0); linearLogin.SetY (Configuration.getHeight(30));
			linearSingup.SetX (0); linearSingup.SetY (Configuration.getHeight(785));

			relSingup.AddView (linearLogo);
			relSingup.AddView (linearContentText);
			relSingup.AddView (linearLogin);
			relSingup.AddView (linearSingup);
			mainLayout.AddView (relSingup);


			btnSingUp.Click+= delegate {

				if(chkLogin.Checked==true){
					var com = ((LoginViewModel)this.DataContext).SignUpCommand;
					com.Execute(null);
				}
			};


			btnLogin.Click+= BtnLogin_Click;

			btnFacebook.Click += async delegate {


				await Authenticate(MobileServiceAuthenticationProvider.Facebook);

				/*var com = ((LoginViewModel)this.DataContext).FacebookLoginCommand;
				com.Execute(null);
				*/
			};


			chkLogin.CheckedChange += delegate {
				if(chkLogin.Checked==true){
					btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signuplisto.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));
				}
				if(chkLogin.Checked==false){
					btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signupnolisto.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));
				}

			};
		}
Example #3
0
		private void initUi_SignUp()
		{
			#region initialize
			relSingup = new RelativeLayout (this);
			relLogin = new RelativeLayout (this);

			linearLicencia = new LinearLayout (this);
			linearLogin = new LinearLayout (this);
			linearSingup = new LinearLayout (this);
			linearLogo = new LinearLayout (this);

			linearTxta = new LinearLayout (this);
			linearTxtb = new LinearLayout (this);
			linearTxtc = new LinearLayout (this);
			linearContentText = new LinearLayout (this);

			imgLogo = new ImageView (this);
			btnLogin = new ImageButton (this);
			btnSingUp = new ImageButton (this);
			btnFacebook = new ImageButton (this);

			chkLogin = new CheckBox (this);

			txtLicencia_a = new TextView (this);
			txtLicencia_b = new TextView (this);

			txtlogin_a1 = new TextView (this);
			txtlogin_a2 = new TextView (this);
			txtlogin_b1 = new TextView (this);
			txtlogin_b2 = new TextView (this);
			txtlogin_c1 = new TextView (this);
			txtlogin_c2 = new TextView (this);
			#endregion

			relLogin.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);
			relSingup.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);

			linearTxta.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearTxtb.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearTxtc.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearContentText.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);

			linearLicencia.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearLicencia.Orientation = Orientation.Horizontal;
			linearLicencia.SetGravity (GravityFlags.Center);
			linearLogin.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearLogin.Orientation = Orientation.Horizontal;
			linearLogin.SetGravity (GravityFlags.Right);
			linearSingup.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearSingup.Orientation = Orientation.Vertical;
			linearSingup.SetGravity (GravityFlags.Center);
			linearLogo.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			linearLogo.Orientation = Orientation.Vertical;
			linearLogo.SetGravity (GravityFlags.Center);


			initText (txtlogin_a1, "Connect ", "#00c6ff");
			txtlogin_a1.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			initText (txtlogin_a2, " width yout classmates ", "#ffffff");
			txtlogin_a2.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			initText (txtlogin_b1, "Get help ", "#00c6ff");
			txtlogin_b1.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			initText (txtlogin_b2, " on homework ", "#ffffff");
			txtlogin_b2.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			initText (txtlogin_c1, "Get better graces ", "#00c6ff");
			txtlogin_c1.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			initText (txtlogin_c2, " for real", "#ffffff");
			txtlogin_c2.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			linearTxta.Orientation = Orientation.Horizontal;
			linearTxta.SetGravity (GravityFlags.Center);
			linearTxtb.Orientation = Orientation.Horizontal;
			linearTxtb.SetGravity (GravityFlags.Center);
			linearTxtc.Orientation = Orientation.Horizontal;
			linearTxtc.SetGravity (GravityFlags.Center);

			linearContentText.Orientation = Orientation.Vertical;
			linearContentText.SetGravity (GravityFlags.Center);

			linearTxta.AddView (txtlogin_a1); linearTxta.AddView (txtlogin_a2);
			linearTxtb.AddView (txtlogin_b1); linearTxtb.AddView (txtlogin_b2);
			linearTxtc.AddView (txtlogin_c1); linearTxtc.AddView (txtlogin_c2);

			linearContentText.AddView (linearTxta);
			linearContentText.AddView (linearTxtb);
			linearContentText.AddView (linearTxtc);

			var textFormat = Android.Util.ComplexUnitType.Px;

			txtLicencia_a.Text = "TO REGISTER, ACCEPT THE";
			txtLicencia_a.SetTextSize(textFormat,Configuration.getHeight(25));
			txtLicencia_a.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			txtLicencia_a.SetTextColor (Color.ParseColor ("#ffffff"));
			txtLicencia_b.Text = " TERMS OF USE";
			txtLicencia_b.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			txtLicencia_b.SetTextSize(textFormat,Configuration.getHeight(25));
			txtLicencia_b.SetTextColor (Color.ParseColor ("#00c6ff"));
			chkLogin.Checked = false;

			chkLogin.SetBackgroundColor(Color.ParseColor("#ffffff"));

			imgLogo.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/logo.png"), Configuration.getWidth(317), Configuration.getHeight(70),true));
			btnLogin.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/login.png"), Configuration.getWidth(210), Configuration.getHeight(60),true));
			btnFacebook.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signupface.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));
			btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signupnolisto.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));

			Drawable dc = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/toregister.png"), Configuration.getWidth(47), Configuration.getHeight(47), true));
			chkLogin.SetBackgroundDrawable (dc);

			initButtonColor (btnLogin);
			initButtonColor (btnFacebook);
			initButtonColor (btnSingUp);
			linearLicencia.AddView (chkLogin);
			linearLicencia.AddView (txtLicencia_a);
			linearLicencia.AddView (txtLicencia_b);

			linearLogin.AddView (btnLogin);
			linearSingup.AddView (linearLicencia);
			linearSingup.AddView (btnSingUp);
			linearSingup.AddView (btnFacebook);

			linearLogo.AddView (imgLogo);

			linearLogo.SetX (0); linearLogo.SetY (Configuration.getHeight(447));
			linearContentText.SetX (0); linearContentText.SetY (Configuration.getHeight(557));
			linearLogin.SetX (0); linearLogin.SetY (Configuration.getHeight(30));
			linearSingup.SetX (0); linearSingup.SetY (Configuration.getHeight(785));

			relSingup.AddView (linearLogo);
			relSingup.AddView (linearContentText);
			relSingup.AddView (linearLogin);
			relSingup.AddView (linearSingup);
			mainLayout.AddView (relSingup);


			#region buttons_events

			btnLogin.Click+= BtnLogin_Click;

			btnSingUp.Click+= delegate {

				if(chkLogin.Checked==true){
					var com = ((LoginViewModel)this.DataContext).SignUpCommand;
					com.Execute(null);
				}
			} ;

			btnFacebook.Click += async delegate {
				await Authenticate(MobileServiceAuthenticationProvider.Facebook);
			} ;

			chkLogin.CheckedChange += delegate {
				if(chkLogin.Checked==true){
					btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signuplisto.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));
				}
				if(chkLogin.Checked==false){
					btnSingUp.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/signupnolisto.png"), Configuration.getWidth(507), Configuration.getHeight(80),true));
				}

			} ;
			#endregion


		}