当前位置: 首页>>代码示例>>C#>>正文


C# LinearLayout.SetX方法代码示例

本文整理汇总了C#中LinearLayout.SetX方法的典型用法代码示例。如果您正苦于以下问题:C# LinearLayout.SetX方法的具体用法?C# LinearLayout.SetX怎么用?C# LinearLayout.SetX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LinearLayout的用法示例。


在下文中一共展示了LinearLayout.SetX方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

		void Initialize ()
		{

			var metrics = Resources.DisplayMetrics;
			widthInDp = ((int)metrics.WidthPixels);
			heightInDp = ((int)metrics.HeightPixels);
			Configuration.setWidthPixel (widthInDp);
			Configuration.setHeigthPixel (heightInDp);

			this.SetBackgroundColor (Color.ParseColor ("#000000"));


			linearContainerFisrst = new LinearLayout (context);
			//linearContainer = new LinearLayout (context);
			linearImageLO = new LinearLayout (context);
			linearTextLO = new LinearLayout (context);
			linearLike = new LinearLayout (context);

			txtAuthor = new TextView (context);
			txtChapter= new TextView (context);
			txtNameLO = new TextView (context);
			txtLike = new TextView (context);



			imgHeart= new ImageView (context);

			this.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(637));


			linearContainerFisrst.LayoutParameters = new LinearLayout.LayoutParams (-1, -1);
			linearImageLO.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(637));
			linearTextLO.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(250));
			linearLike.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(120), Configuration.getHeight(80));


			//Drawable drBack =new BitmapDrawable(Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/fondocondiagonalm.png"), 640, 1136, true));
			//linearContainerFisrst.SetBackgroundDrawable (drBack);
			//drBack = null;


			linearTextLO.Orientation = Orientation.Vertical;
			linearTextLO.SetGravity(GravityFlags.Right);

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



			linearContainerFisrst.Orientation = Orientation.Vertical;



			//Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/fondounidad.png"), 480, 640, true));
			//linearImageLO.SetBackgroundDrawable (d);

			//imgHeart.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/like.png"), Configuration.getWidth(43), Configuration.getHeight(43), true));



			txtNameLO.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtChapter.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (50));
			txtAuthor.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtNameLO.Typeface = Typeface.DefaultBold;


			txtAuthor.SetTextColor (Color.ParseColor("#ffffff"));
			txtChapter.SetTextColor (Color.ParseColor("#ffffff"));
			txtNameLO.SetTextColor (Color.ParseColor("#ffffff"));
			txtLike.SetTextColor (Color.ParseColor("#ffffff"));

			txtAuthor.Gravity = GravityFlags.Right;
			txtChapter.Gravity = GravityFlags.Right;
			txtNameLO.Gravity = GravityFlags.Right;
			txtLike.Gravity = GravityFlags.Center;

			linearTextLO.AddView (txtNameLO);
			linearTextLO.AddView (txtChapter);
			linearTextLO.AddView (txtAuthor);

			linearLike.AddView (imgHeart);
			linearLike.AddView (txtLike);

			linearTextLO.SetX (0); linearTextLO.SetY (Configuration.getHeight(398));

			linearLike.SetX (0); linearLike.SetY (Configuration.getHeight(438));
			linearContainerFisrst.SetX (0); linearContainerFisrst.SetY (0);

			linearImageLO.SetX (0); linearImageLO.SetY (0);

			linearTextLO.SetPadding (0, 0, Configuration.getWidth (35), 0);
			this.AddView (linearImageLO);
			this.AddView (linearTextLO);
			this.AddView (linearLike);
			this.AddView (linearContainerFisrst);

		}
开发者ID:aocsa,项目名称:CInca,代码行数:97,代码来源:FrontContainerView.cs

示例2: Initialize

		void Initialize ()
		{

			var metrics = Resources.DisplayMetrics;
			widthInDp = ((int)metrics.WidthPixels);
			heightInDp = ((int)metrics.HeightPixels);
			Configuration.setWidthPixel (widthInDp);
			Configuration.setHeigthPixel (heightInDp);

			this.SetBackgroundColor (Color.ParseColor ("#000000"));


			linearContainerFisrst = new LinearLayout (context);
			//linearContainer = new LinearLayout (context);
			linearImageLO = new LinearLayout (context);
			linearTextLO = new LinearLayout (context);
			//linearLike = new LinearLayout (context);

			txtDescription = new TextView (context);
		
			txtTitle = new TextView (context);
			//txtLike = new TextView (context);
			//imgBack = new ImageButton(context);



			txtDescription= new TextView (context);

			this.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(637));


			linearContainerFisrst.LayoutParameters = new LinearLayout.LayoutParams (-1, -1);
			linearImageLO.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(637));
			linearTextLO.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(250));
		//	linearLike.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(120), Configuration.getHeight(80));



			linearTextLO.Orientation = Orientation.Vertical;
			linearTextLO.SetGravity(GravityFlags.Right);

		//	linearLike.Orientation = Orientation.Vertical;
		//	linearLike.SetGravity (GravityFlags.Center);
			//initButtonColor(imgBack);


			linearContainerFisrst.Orientation = Orientation.Vertical;



			//Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/fondounidad.png"), 240, 320, true));
			//linearImageLO.SetBackgroundDrawable (d);

			//imgBack.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/atras.png"), Configuration.getWidth(43), Configuration.getWidth(43), true));



			txtTitle.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (50));

			txtDescription.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtTitle.Typeface = Typeface.DefaultBold;


			txtDescription.SetTextColor (Color.ParseColor("#ffffff"));

			txtTitle.SetTextColor (Color.ParseColor("#ffffff"));
			//txtLike.SetTextColor (Color.ParseColor("#ffffff"));
		
			txtDescription.Gravity = GravityFlags.Right;

			txtTitle.Gravity = GravityFlags.Right;
			//txtLike.Gravity = GravityFlags.Center;

			linearTextLO.AddView (txtTitle);
		
			linearTextLO.AddView (txtDescription);

			//linearLike.AddView (imgBack);
			//linearLike.AddView (txtLike);

			linearTextLO.SetX (0); linearTextLO.SetY (Configuration.getHeight(398));

			//imgBack.SetX (Configuration.getWidth (20)); imgBack.SetY (Configuration.getHeight (20));
			//linearLike.SetX (0); linearLike.SetY (Configuration.getHeight(438));
			linearContainerFisrst.SetX (0); linearContainerFisrst.SetY (0);

			linearImageLO.SetX (0); linearImageLO.SetY (0);


			this.AddView (linearImageLO);
			this.AddView (linearTextLO);
			//this.AddView (imgBack);
			this.AddView (linearContainerFisrst);

		}
开发者ID:aocsa,项目名称:eduticnow.droid,代码行数:95,代码来源:FrontContainerViewPager.cs

示例3: iniMenu


//.........这里部分代码省略.........
			imgCurse.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/curso.png"),Configuration.getWidth (23), Configuration.getHeight (28),true));
			imgTask.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/vertareas.png"),Configuration.getWidth (23), Configuration.getHeight (28),true));

			Drawable drPendiente = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/pendiente.png"), Configuration.getWidth(30), Configuration.getWidth(30), true));
			linearPendiente.SetBackgroundDrawable (drPendiente);
			drPendiente = null;

			imgCurse.SetPadding (Configuration.getWidth (68), 0, 0, 0);
			imgTask.SetPadding(Configuration.getWidth(68),0,0,0);


			linearCurse.SetBackgroundColor(Color.ParseColor("#0d1216"));
			linearTask.SetBackgroundColor (Color.ParseColor ("#0d1216"));

			linearBarraCurso.AddView (txtCurse);
			linearBarraCurso.AddView (progressBar);

			linearTxtValorBarra.AddView (txtValorBarra);

			linearCurse.AddView (imgCurse);
			linearCurse.AddView (txtCurseTitle);
			linearTask.AddView (imgTask);
			linearTask.AddView (txtTaskTitle);
			linearPendiente.AddView (txtPendiente);



			imgSchool.SetPadding (Configuration.getWidth(68),0,0,0);
			txtSchoolName.SetPadding (Configuration.getWidth(40),0,0,0);
			linearSchool.AddView (imgSchool);
			linearSchool.AddView (txtSchoolName);

			linearUser.AddView (txtUserName);
			linearUser.AddView (txtUserRol);

			linearUserData.AddView (imgUser);
			linearUserData.AddView (linearUser);

			linearListCurso.AddView (listCursos);
			linearListTask.AddView (listTasks);

			linearList.AddView (linearCurse);
			linearList.AddView (linearListCurso);
			linearList.AddView (linearTask);
			linearList.AddView (linearListTask);


			imgChat.SetX (Configuration.getWidth(59)); imgChat.SetY (Configuration.getHeight(145));
			imgChat.Click += delegate {
				mDrawerLayout.CloseDrawer (mLeftDrawer);
				mDrawerLayout.OpenDrawer (mRightDrawer);
			};
				
			imgNotificacion.SetX (Configuration.getWidth(59));  imgNotificacion.SetY (Configuration.getHeight(233)); 
			imgNotificacion.Click += delegate {
				mDrawerLayout.CloseDrawer (mLeftDrawer);
				main_ContentView.RemoveAllViews ();
				main_ContentView.AddView(new NotificationView(this));
			};


			linearPendiente.SetX (Configuration.getWidth(94));  linearPendiente.SetY (Configuration.getHeight(217)); 

			linearUserData.SetX (0); linearUserData.SetY (Configuration.getHeight(130));
			linearBarraCurso.SetX (0); linearBarraCurso.SetY (Configuration.getHeight(412));
			linearTxtValorBarra.SetX (0); linearTxtValorBarra.SetY (Configuration.getHeight(443));
			linearSchool.SetX (0); linearSchool.SetY (Configuration.getHeight(532));
			linearList.SetX (0); linearList.SetY (Configuration.getHeight(583));

			Bitmap bm;
			txtUserName.Text = vm.UserFirstName + " "+ vm.UserLastName;

			if (vm.UserImage != null) {
				bm = BitmapFactory.DecodeByteArray (vm.UserImage, 0, vm.UserImage.Length);

				Bitmap newbm = Configuration.GetRoundedCornerBitmap (Bitmap.CreateScaledBitmap (bm,Configuration.getWidth (154), Configuration.getHeight (154),true));
				imgUser.SetImageBitmap (newbm);
			
				newbm = null;
			}
			bm = null;



			mainLayout.AddView (imgChat);
			mainLayout.AddView (imgNotificacion);
			mainLayout.AddView (linearPendiente);
			mainLayout.AddView (linearUserData);
			mainLayout.AddView (linearBarraCurso);
			mainLayout.AddView (linearTxtValorBarra);
			mainLayout.AddView (linearSchool);
			mainLayout.AddView (linearList);

			imgChat = null;
			imgNotificacion = null;
			imgCurse = null;
			imgTask = null;
			imgSchool = null;
			imgUser = null;
		}
开发者ID:aocsa,项目名称:eduticnow.droid,代码行数:101,代码来源:MainView.cs

示例4: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            Logging.Log (this, Logging.LoggingTypeDebug, "OnCreate()");

            SetContentView(Resource.Layout.Edit);

            presentationsHelper = new PresentationsHelper (this);

            Display display = WindowManager.DefaultDisplay;
            Point size = new Point ();
            display.GetSize (size);
            int screenWidth = size.X;
            int screenHeight = size.Y;

            // define animations
            DefineAnimations (screenWidth);

            // set default values
            llChoosePresentation = FindViewById<LinearLayout> (Resource.Id.llChoosePresentation);
            llPresentationInfo = FindViewById<LinearLayout> (Resource.Id.llPresentationInfo);

            llChoosePresentation.SetX(0);
            llChoosePresentation.LayoutParameters = new RelativeLayout.LayoutParams (300, screenHeight);

            llPresentationInfo.SetX (300);
            llPresentationInfo.LayoutParameters = new RelativeLayout.LayoutParams (screenWidth - 300, screenHeight);

            selectedLongClickItemPosition= -1;

            lvSlides = FindViewById<ListView>(Resource.Id.lvSlides);
            lvSlides.ItemClick += LvSlides_ItemClick;

            LoadSlidesList ();

            RegisterForContextMenu(lvSlides);
        }
开发者ID:00091701,项目名称:FullscreenPresentation-Mono,代码行数:37,代码来源:EditActivity.cs

示例5: ini


//.........这里部分代码省略.........
			linearImageLO.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(372));
			linearTextLO.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(250));
			linearLike.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(120), Configuration.getHeight(80));
			linearUsers.LayoutParameters = new LinearLayout.LayoutParams (-1,-2);

			linearTextLO.Orientation = Orientation.Vertical;
			linearTextLO.SetGravity(GravityFlags.Right);

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

			linearUsers.Orientation = Orientation.Horizontal;
			linearUsers.SetGravity (GravityFlags.Center);

			linearContainer.Orientation = Orientation.Vertical;
			//linearContainer.SetGravity (GravityFlags.Center);

			//Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/fondounidad.png"), 480, 640, true));
			//linearImageLO.SetBackgroundDrawable (d);

			imgHeart.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/like.png"), Configuration.getWidth(43), Configuration.getHeight(43), true));


			txtAuthor.Text = "Author : David Spencer";
			txtChapter.Text = "Flora y Fauna";
			txtNameLO.Text = "Camino Inca";
			txtLike.Text = "10";

			//txtChapter.SetMaxWidth (Configuration.getWidth (580));
			//txtChapter.Ellipsize = TextUtils.TruncateAt.End;
			//txtChapter.SetMaxLines(1);



			txtAuthor.SetTextColor (Color.ParseColor("#ffffff"));
			txtChapter.SetTextColor (Color.ParseColor("#ffffff"));
			txtNameLO.SetTextColor (Color.ParseColor("#ffffff"));
			txtLike.SetTextColor (Color.ParseColor("#ffffff"));

			txtNameLO.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtChapter.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (50));
			txtAuthor.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtNameLO.Typeface = Typeface.DefaultBold;

			txtAuthor.Gravity = GravityFlags.Right;
			txtChapter.Gravity = GravityFlags.Right;
			txtNameLO.Gravity = GravityFlags.Right;
			txtLike.Gravity = GravityFlags.Center;

			linearTextLO.AddView (txtNameLO);
			linearTextLO.AddView (txtChapter);
			linearTextLO.AddView (txtAuthor);

			linearTextLO.SetPadding (0, 0, Configuration.getWidth (30), 0);

			linearLike.AddView (imgHeart);
			linearLike.AddView (txtLike);


			_mCommentData = new List<CommentDataRow> ();
			/*
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
			_mCommentData.Add (new CommentDataRow (){im_profile="images/e1.jpg" , name="Ryan Elliot", date = "10:00pm", comment = "Esto es un comentario" });
*/
//			commentList.Adapter = new CommentListViewAdapter (context, _mCommentData);
			commentList.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(654));


			commentList.SetX (0);commentList.SetY (Configuration.getHeight (530));

			linearTextLO.SetX (0); linearTextLO.SetY (Configuration.getHeight(200));
			//linearImageLO.SetX (0); linearImageLO.SetY (0);
			linearLike.SetX (0); linearLike.SetY (Configuration.getHeight(256));
			linearContainer.SetX (0); linearContainer.SetY (0);

			linearContainer.AddView (linearImageLO);
			linearContainer.AddView (linearUsers);
			mainLayout.AddView (linearContainer);

			//mainLayout.AddView (linearImageLO);
			mainLayout.AddView (linearTextLO);

			mainLayout.AddView (linearLike);
			mainLayout.AddView (commentList);

			this.AddView (mainLayout);

			/*linearImageLO.Click += delegate {
				var com = ((LOViewModel)context.DataContext).SignUpCommand;
				com.Execute(null);
			};
		*/

		}
开发者ID:aocsa,项目名称:CInca,代码行数:101,代码来源:LOContainerView.cs

示例6: ini

		public void ini(){


			var textFormat = Android.Util.ComplexUnitType.Px;

			mainLayout = new RelativeLayout (context);
			mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);


			contenLayout = new LinearLayout (context);
			contenLayout.LayoutParameters = new LinearLayout.LayoutParams (-2, -2);
			contenLayout.Orientation = Orientation.Vertical;


			//LIST

			contentListLayout = new LinearLayout (context);
			contentListLayout.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(583),Configuration.getHeight(300));
			contentListLayout.Orientation = Orientation.Vertical;
			titleHeaderList = new TextView (context);
			contentList = new ListView (context);

			//titleHeaderList.Text = "Tipos de Aves";
			titleHeaderList.SetTextColor (Color.ParseColor ("#FF0080"));
			titleHeaderList.SetTextSize (textFormat, Configuration.getHeight (38));
			titleHeaderList.SetMaxWidth (Configuration.getWidth (510));

			contentListLayout.SetBackgroundResource (Resource.Drawable.border);
			contentListLayout.AddView (titleHeaderList);
			contentListLayout.AddView (contentList);


			contentListLayout.SetX (Configuration.getHeight (25));
			//contentListLayout.SetY (Configuration.getWidth (450));


			//ENDLIST

			imBorderList = new ImageView (context);
			mainLayout.AddView (contentListLayout);
		}
开发者ID:aocsa,项目名称:eduticnow.droid,代码行数:41,代码来源:Template3.cs

示例7: initUnidades

		public void initUnidades(int indexCurso, int indexUnidad)
		{
			var textFormat = Android.Util.ComplexUnitType.Px;
			_spaceUnidades.RemoveAllViews ();
			_listLinearUnidades.Clear ();
			_listIconMap.Clear ();
			_listIconVerMap.Clear ();
			int numUnidades = _listUnidades.Count;
			for (int i = 0; i < numUnidades; i++) 
			{
				LinearLayoutLO linearUnidad = new LinearLayoutLO (context);
				linearUnidad.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
				linearUnidad.Orientation = Orientation.Vertical;
				linearUnidad.SetGravity (Android.Views.GravityFlags.CenterVertical);
				linearUnidad.index = i;
				linearUnidad.SetPadding (Configuration.getWidth(100), Configuration.getWidth (25),0, Configuration.getWidth (25));
				//linearUnidad.SetX (100);

				if (indexCurso == 0) {//Para que solo afecte a las Rutas
					linearUnidad.SetPadding (Configuration.getWidth(100), Configuration.getWidth (25),0, Configuration.getWidth (-25));
				}

				TextView titleUnidad = new TextView(context);
				titleUnidad.SetTextSize (textFormat,Configuration.getHeight(42));
				titleUnidad.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (440), -2);


				if (indexCurso == 2) {
					if (indexUnidad == 3) {
						linearUnidad.Orientation = Orientation.Horizontal;
						ImageIconMap icon = new ImageIconMap (context);
						icon.index = i;
						icon.SetImageBitmap(iconPlay);
						icon.SetX (Configuration.getWidth (60));
						linearUnidad.AddView (icon);
						_listIconMap.Add (icon);
					}
				}

				if (indexCurso == 3) {
					titleUnidad.SetTextSize (textFormat,Configuration.getHeight(55));
				}

				RelativeLayout linearContenido = new RelativeLayout (context);
				linearContenido.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
				linearContenido.SetGravity (Android.Views.GravityFlags.Center);



				//TextView titleUnidad = new TextView(context);
				//titleUnidad.Text = _listUnidades [i].Title;
				titleUnidad.TextFormatted = Html.FromHtml (_listUnidades [i].Title);
				titleUnidad.SetTextColor(Color.ParseColor (Configuration.ListaColores [i % 6]));
				titleUnidad.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");


				TextView descriptionUnidad = new TextView(context);
				descriptionUnidad.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (440), -2);
				//descriptionUnidad.Text = _listUnidades [i].Description;

				descriptionUnidad.TextFormatted = Html.FromHtml (_listUnidades [i].Description);
				//descriptionUnidad.Text = _listUnidades [i].Description;
				descriptionUnidad.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
				descriptionUnidad.SetTextSize (textFormat,Configuration.getHeight(28));
				//Linkify.AddLinks (descriptionUnidad, MatchOptions.All);
				//Huillca
				if (indexCurso == 1   && indexUnidad!=6) {//Para que no afecte a las Rutas ni a los precios
					//Linkify.AddLinks(descriptionUnidad,Patterns.Phone,"tel:");
					//(084) 21-1122  --------modelo de telefono
					//984-820715 ----modelo celular
					Linkify.AddLinks(descriptionUnidad,Java.Util.Regex.Pattern.Compile("\\W\\d+\\W\\s\\d+\\W\\d+"),"tel:");
					Linkify.AddLinks(descriptionUnidad,Java.Util.Regex.Pattern.Compile("\\d+\\W\\d+"),"tel:");
					Linkify.AddLinks(descriptionUnidad,Patterns.EmailAddress,"email:");
					Linkify.AddLinks(descriptionUnidad,Patterns.WebUrl,"http://");
				}


				//descriptionUnidad.MovementMethod = Android.Text.Method.LinkMovementMethod.Instance;
				//descriptionUnidad.LinksClickable = true;

				//descriptionUnidad.SetTextIsSelectable (true);

				LinearLayout linearContenidoIn = new LinearLayout (context);
				linearContenidoIn.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
				linearContenidoIn.Orientation = Orientation.Vertical;
				//linearContenidoIn.SetGravity (Android.Views.GravityFlags.Center);



				linearContenidoIn.AddView (titleUnidad);
				linearContenidoIn.AddView (descriptionUnidad);

				linearContenido.AddView (linearContenidoIn);

				if (indexCurso == 2) {
					linearContenidoIn.RemoveView (descriptionUnidad);
					ImageView imgUnidad = new ImageView (context);
					Picasso.With (context).Load (_listUnidades[i].ImageUrl).Resize(Configuration.getWidth(440),Configuration.getHeight(440)).Placeholder(context.Resources.GetDrawable (Resource.Drawable.progress_animation)).CenterInside().Into (imgUnidad);
					linearContenidoIn.AddView (imgUnidad);
					linearContenidoIn.SetGravity (Android.Views.GravityFlags.Center);
//.........这里部分代码省略.........
开发者ID:aocsa,项目名称:CInca,代码行数:101,代码来源:WallView.cs

示例8: ini

		public void ini(){

			var textFormat = Android.Util.ComplexUnitType.Px;

			mainLayout = new RelativeLayout (context);
			mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);

			Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/fondo.png"), 1024, 768, true));
			mainLayout.SetBackgroundDrawable (d);


			title = new TextView (context);
			imgLinea = new ImageView (context);
			listNotification = new ListView (context);
			linearList = new LinearLayout (context);
			imgPoint = new ImageView (context);


			title.Text = "Notificaciones";
			title.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			title.SetTextColor (Color.ParseColor ("#ffffff"));
			title.SetTextSize (textFormat, Configuration.getHeight (48));
			title.SetX (Configuration.getHeight (35));
			title.SetY (Configuration.getWidth (142));

			linearList.SetBackgroundColor (Color.ParseColor ("#ffffff"));
			linearList.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (886));
			linearList.SetX (Configuration.getWidth (0));	linearList.SetY (Configuration.getHeight(250));

			listNotification.SetX (Configuration.getWidth (0));	listNotification.SetY (Configuration.getHeight(250));
			listNotification.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight (886));

			imgLinea.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/lineanotificaciones.png"), 4,2000 , true));
			imgLinea.SetX (Configuration.getWidth (61));	imgLinea.SetY (Configuration.getHeight(240));

			imgPoint.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/circblanco.png"), 30,30 , true));
			imgPoint.SetX (Configuration.getWidth (52));	imgPoint.SetY (Configuration.getHeight(228));

			//linearList.AddView (listNotification);


			mainLayout.AddView (title);

			mainLayout.AddView(linearList);
			mainLayout.AddView (listNotification);
			mainLayout.AddView (imgLinea);
			mainLayout.AddView (imgPoint);


		}
开发者ID:aocsa,项目名称:CInca,代码行数:50,代码来源:NotificationView.cs

示例9: init

		public void init(){
			mainLayout = new RelativeLayout (this);
			txtRegister = new TextView (this);
			etxtEmail = new EditText (this);
			etxtUser = new EditText (this);
			etxtPassword = new EditText (this);
			btnCreateAccount = new ImageButton (this);
			linearButtonRegister = new LinearLayout (this);
			linearRegister = new LinearLayout (this);


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

			etxtUser.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (507), Configuration.getHeight (78));
			etxtPassword.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (507), Configuration.getHeight (78));
			etxtEmail.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (507), Configuration.getHeight (78));
				
	


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


			txtRegister.Text = "Registro";
			txtRegister.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");


			etxtUser.Hint ="  Nombre de usuario";
			etxtUser.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");


			etxtEmail.Hint = "  Dirección de correo";
			etxtEmail.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");


			etxtPassword.Hint ="  Contraseña";
			etxtPassword.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");


			Drawable drawableEditText = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/cajatexto.png"), Configuration.getWidth (507), Configuration.getHeight (80), true));

			etxtUser.SetBackgroundDrawable (drawableEditText);
			etxtPassword.SetBackgroundDrawable (drawableEditText);
			etxtEmail.SetBackgroundDrawable (drawableEditText);

			etxtUser.SetTextColor (Color.ParseColor ("#ffffff"));
			etxtUser.SetSingleLine (true);
			etxtPassword.SetTextColor (Color.ParseColor ("#ffffff"));
			etxtPassword.SetSingleLine (true);
			etxtEmail.SetTextColor (Color.ParseColor ("#ffffff"));
			etxtEmail.SetSingleLine (true);

			txtRegister.SetTextColor (Color.ParseColor("#ffffff"));
			txtRegister.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (40));

			etxtPassword.InputType = InputTypes.TextVariationVisiblePassword;
			etxtPassword.TransformationMethod = Android.Text.Method.PasswordTransformationMethod.Instance;

			btnCreateAccount.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/crearcuenta.png"), Configuration.getWidth (507), Configuration.getHeight (80), true));
			btnCreateAccount.Alpha = 255;
			//btn.SetAlpha(255);
			btnCreateAccount.SetBackgroundColor(Color.Transparent);


			LinearLayout space = new LinearLayout (this);
			space.LayoutParameters = new LinearLayout.LayoutParams (-1, 20);
			LinearLayout space2 = new LinearLayout (this);
			space2.LayoutParameters = new LinearLayout.LayoutParams (-1, 20);

			linearRegister.AddView (etxtUser);
			linearRegister.AddView (space);
			linearRegister.AddView (etxtEmail);
			linearRegister.AddView (space2);
			linearRegister.AddView (etxtPassword);

			linearButtonRegister.AddView (btnCreateAccount);

			txtRegister.SetX (Configuration.getWidth(72)); txtRegister.SetY (Configuration.getHeight(535));
			linearRegister.SetX (0); linearRegister.SetY (Configuration.getHeight(592));
			linearButtonRegister.SetX (0); linearButtonRegister.SetY (Configuration.getHeight(975));
			mainLayout.AddView (txtRegister);
			mainLayout.AddView (linearRegister);
			mainLayout.AddView (linearButtonRegister);

			//string ndef = "None" ;

			//string foto = "http://www.clinicatorielli.com/img/icons/no-user.png";

			EditText lastName = new EditText (this);
			lastName.Text = "None";

			EditText url = new EditText (this);
			url.Text = "http://www.clinicatorielli.com/img/icons/no-user.png";
//.........这里部分代码省略.........
开发者ID:aocsa,项目名称:eduticnow.droid,代码行数:101,代码来源:RegisterView.cs

示例10: ini

		public void ini(){

			_txtCursoN = new TextView (context);
			_txtCursoN.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			_txtUnidadN = new TextView (context);
			_mainLayout = new RelativeLayout (context);

			linearGradiente = new LinearLayout (context);
			linearGradiente.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (310));
			linearGradiente.SetBackgroundResource (Resource.Drawable.gradiente);


			var textFormat = Android.Util.ComplexUnitType.Px;

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

			_scrollSpace = new VerticalScrollView (context);
			_scrollSpace.LayoutParameters = new VerticalScrollView.LayoutParams (-1, Configuration.getHeight(1015-85));
			_scrollSpace.SetY (Configuration.getHeight (125));
			//_scrollSpace.SetBackgroundColor (Color.ParseColor ("#FF0000"));
			_mainLayout.AddView (_scrollSpace);


			_publicidadLayout = new LinearLayout (context);
			_publicidadLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (85));
			Drawable dr = new BitmapDrawable (getBitmapFromAsset ("images/footerad.jpg"));
			_publicidadLayout.SetBackgroundDrawable (dr);
			_publicidadLayout.SetY (Configuration.getHeight(1136-85));
			_mainLayout.AddView (_publicidadLayout);
			_publicidadLayout.Click += delegate {
				if (adOpen) {
					hideAd ();
				} else {
					Random rnd = new Random();
					showAd (rnd.Next(adsImagesPath.Count));
				}
			};




			_mapSpace = new LinearLayout (context);

			_mapSpace.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (1015));
			_mapSpace.SetY(Configuration.getHeight (125));
			_mainLayout.AddView (_mapSpace);


			_mainSpace = new LinearLayout (context);
			_mainSpace.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			_mainSpace.Orientation = Orientation.Vertical;

			_scrollSpace.AddView (_mainSpace);

			_fondo2 = new RelativeLayout (context);
			_fondo2.LayoutParameters = new RelativeLayout.LayoutParams (-1, Configuration.getWidth (640));
			_fondo2.SetY (Configuration.getHeight (0));

			Drawable dr1 = new BitmapDrawable (getBitmapFromAsset("icons/fondoselec.png"));
			_fondo2.SetBackgroundDrawable (dr1);
			dr1 = null;

			_mainSpace.AddView (_fondo2);

			infoCursoUnidad = new LinearLayout (context);
			infoCursoUnidad.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(250));
			infoCursoUnidad.Orientation = Orientation.Vertical;
			infoCursoUnidad.SetGravity(Android.Views.GravityFlags.Right);
			infoCursoUnidad.SetPadding (Configuration.getWidth(30), Configuration.getWidth (25), Configuration.getWidth(30), Configuration.getWidth (25));
			infoCursoUnidad.SetBackgroundColor (Color.ParseColor ("#40000000"));

			TextView _txtCurso = new TextView (context);
			_txtCurso.Text = Resource.String.THE_ROUTES.ToString ();;
			_txtCurso.SetY (-100);

			//section1-----------------------------------------------
			_contentRLayout_S1 = new RelativeLayout(context);
			_txtTitle_S1 = new TextView (context);
			_txtAuthor_S1 = new TextView (context);
			_imAuthor_S1 = new ImageView (context);
			_txtChapter_S1 = new TextView (context);

			_itemsLayout_S1 = new LinearLayout (context);//not used
			_imItem_S1 = new List<ImageView> ();
			_txtItem_S1 = new List<TextView>();

			_contentRLayout_S1.LayoutParameters = new RelativeLayout.LayoutParams (-1, Configuration.getHeight (480));

			LinearLayout _linearTitle = new LinearLayout (context);
			_linearTitle.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			_linearTitle.SetGravity (Android.Views.GravityFlags.Center);
			_linearTitle.AddView (_txtTitle_S1);
			_linearTitle.SetY (Configuration.getHeight (60));

			linearGradiente.SetX (0); linearGradiente.SetY (Configuration.getHeight(860));
			//_mainLayout.AddView (linearGradiente);
			//_mainLayout.AddView (_linearTitle);

			//_txtTitle_S1.SetX (Configuration.getWidth (245));_txtTitle_S1.SetY (Configuration.getHeight (60));

//.........这里部分代码省略.........
开发者ID:aocsa,项目名称:CInca,代码行数:101,代码来源:WallView.cs

示例11: initUnidades


//.........这里部分代码省略.........
				return;
			}

			/*if (isFavoritos && numUnidades == 0)
			{
				Toast.MakeText(context, "Mis mejores Campamentos VACIOO", ToastLength.Short).Show();
			}*/

			for (int i = 0; i < numUnidades; i++) 
			{
				LinearLayoutLO linearUnidad = new LinearLayoutLO (context);
				linearUnidad.content = _listUnidades[i];
				linearUnidad.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
				linearUnidad.Orientation = Orientation.Vertical;
				linearUnidad.SetGravity (Android.Views.GravityFlags.CenterVertical);
				//linearUnidad.SetBackgroundColor (Color.Blue);
				linearUnidad.index = i;
				linearUnidad.SetPadding (Configuration.getWidth(100), Configuration.getWidth (25),0, Configuration.getWidth (25));
				//linearUnidad.SetX (100);



				TextView titleUnidad = new TextView(context);
				titleUnidad.SetTextSize (textFormat,Configuration.getHeight(42));
				titleUnidad.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (440), -2);


				/*if (indexCurso == 2) {
					if (indexUnidad == 3) {
						linearUnidad.Orientation = Orientation.Horizontal;
						ImageIconMap icon = new ImageIconMap (context);
						icon.index = i;
						icon.SetImageBitmap(iconPlay);
						icon.SetX (Configuration.getWidth (60));
						linearUnidad.AddView (icon);
						_listIconMap.Add (icon);
					}
				} */

				if (indexCurso == 3) {
					
					titleUnidad.SetTextSize (textFormat,Configuration.getHeight(55));

				}

				RelativeLayout linearContenido = new RelativeLayout (context);
				linearContenido.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
				linearContenido.SetGravity (Android.Views.GravityFlags.Center);



				//TextView titleUnidad = new TextView(context);
				//titleUnidad.Text = _listUnidades [i].Title;
				titleUnidad.TextFormatted = Html.FromHtml (_listUnidades [i].Title);
				titleUnidad.SetTextColor(Color.ParseColor(Configuration.colorGlobal));
				if (indice_navigator == 0)
				{
					if (titleUnidad.Text.Equals("Calzado") || titleUnidad.Text.Equals("Footwear"))
					{
						titleUnidad.SetTextColor(Color.ParseColor(Configuration.colorCalzado));
					}
				}

				//titleUnidad.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");

开发者ID:joselhuillca,项目名称:PeruCampinV2,代码行数:65,代码来源:WallView.cs

示例12: ini


//.........这里部分代码省略.........
			linearImageLO = new LinearLayout (context);

			linearTaskComplete.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(84));
			linearTaskIncomplete.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(84));
			linearImageLO.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(372));
			linearTextLO.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(250));
			linearContentTask.LayoutParameters = new LinearLayout.LayoutParams(-1,-2);
			linearListTaskC.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(255));
			linearListTaskI.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(255));


			linearTaskComplete.Orientation = Orientation.Horizontal;
			linearTaskComplete.SetGravity(GravityFlags.Center);

			linearTaskIncomplete.Orientation = Orientation.Horizontal;
			linearTaskIncomplete.SetGravity(GravityFlags.Center);

			linearTextLO.Orientation = Orientation.Vertical;
			linearTextLO.SetGravity(GravityFlags.Right);

			linearListTaskC.Orientation = Orientation.Vertical;
			linearListTaskI.Orientation = Orientation.Vertical;
			//linearListTaskC.SetGravity(Gravity

			linearContentTask.Orientation = Orientation.Vertical;


			txtAuthor.Text = "Author : David Spencer";
			txtChapter.Text = "Flora y Fauna";
			txtNameLO.Text = "Camino Inca";


			txtAuthor.SetPadding (0, 0, Configuration.getWidth (30), 0);
			txtChapter.SetPadding (0, 0, Configuration.getWidth (30), 0);
			txtNameLO.SetPadding (0, 0, Configuration.getWidth (30), 0);


			txtTaskComplete.Text = "Tareas Completadas";
			txtTaskIncomplete.Text = "Tareas por completar";

			txtAuthor.SetTextColor (Color.ParseColor("#ffffff"));
			txtChapter.SetTextColor (Color.ParseColor("#ffffff"));
			txtNameLO.SetTextColor (Color.ParseColor("#ffffff"));

			txtNameLO.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtChapter.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (50));
			txtAuthor.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtNameLO.Typeface = Typeface.DefaultBold;


			txtAuthor.Gravity = GravityFlags.Right;
			txtChapter.Gravity = GravityFlags.Right;
			txtNameLO.Gravity = GravityFlags.Right;

			txtTaskComplete.SetTextColor (Color.ParseColor ("#999999"));
			txtTaskIncomplete.SetTextColor (Color.ParseColor ("#999999"));
			linearTaskComplete.SetBackgroundColor (Color.ParseColor ("#eeeeee"));
			linearTaskIncomplete.SetBackgroundColor (Color.ParseColor ("#eeeeee"));

			//Drawable d = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/desert.jpg"), 480, 640, true));
			//linearImageLO.SetBackgroundDrawable (d);

			//imgLinea.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/lineatareas.png"), 4,2000 , true));

			linearTaskComplete.AddView (txtTaskComplete);
			linearTaskIncomplete.AddView (txtTaskIncomplete);

			linearTextLO.AddView (txtNameLO);
			linearTextLO.AddView (txtChapter);
			linearTextLO.AddView (txtAuthor);


			linearListTaskC.AddView (listTaskComplete);
			linearListTaskI.AddView (listTaskIncomplete);

			linearContentTask.AddView (linearImageLO);
			linearContentTask.AddView (linearTaskComplete);
			linearContentTask.AddView (linearListTaskC);
			linearContentTask.AddView (linearTaskIncomplete);
			linearContentTask.AddView (linearListTaskI);


			linearTextLO.SetX (0); linearTextLO.SetY (Configuration.getHeight(200));
			//linearImageLO.SetX (0); linearImageLO.SetY (0);

			linearContentTask.SetX(0); linearContentTask.SetY(0);

			imgLinea.SetX (Configuration.getWidth(75));  imgLinea.SetY (Configuration.getHeight(350));



			mainLayout.AddView (imgLinea);
			mainLayout.AddView (linearContentTask);
			mainLayout.AddView (linearTextLO);





		}
开发者ID:aocsa,项目名称:CInca,代码行数:101,代码来源:TaskView.cs

示例13: ini

		public void ini(){


			//creating comment List



			commentLayout = new LinearLayout(context);
			commentLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (934));
			commentList = new ListView (context);


			//commentList.AddView (commentList);



			//end comment List

			_mainLayout = new RelativeLayout (context);


			linearGradiente = new LinearLayout (context);
			linearGradiente.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (541));
			linearGradiente.SetBackgroundResource (Resource.Drawable.gradiente);


			var textFormat = Android.Util.ComplexUnitType.Px;

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

			_fondo2 = new LinearLayout (context);
			_fondo2.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getWidth (640));
			_fondo2.SetY (Configuration.getHeight (109));

			Drawable dr1 = new BitmapDrawable (getBitmapFromAsset("icons/fondoselec.png"));
			_fondo2.SetBackgroundDrawable (dr1);
			dr1 = null;
			_mainLayout.AddView (_fondo2);

			//section1-----------------------------------------------
			_contentRLayout_S1 = new RelativeLayout(context);
			_txtTitle_S1 = new TextView (context);
			_txtAuthor_S1 = new TextView (context);
			_imAuthor_S1 = new ImageView (context);
			_txtChapter_S1 = new TextView (context);

			_itemsLayout_S1 = new LinearLayout (context);//not used
			_imItem_S1 = new List<ImageView> ();
			_txtItem_S1 = new List<TextView>();





			//_mainLayout.AddView (_txtTitle_S1);
			//_mainLayout.AddView (_txtAuthor_S1);
			_mainLayout.AddView (_imAuthor_S1);

			//_mainLayout.AddView (_txtChapter_S1);







			_contentRLayout_S1.LayoutParameters = new RelativeLayout.LayoutParams (-1, Configuration.getHeight (480));


			LinearLayout _linearTitle = new LinearLayout (context);
			_linearTitle.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			_linearTitle.SetGravity (Android.Views.GravityFlags.Center);
			_linearTitle.AddView (_txtTitle_S1);
			_linearTitle.SetY (Configuration.getHeight (60));

			linearGradiente.SetX (0); linearGradiente.SetY (Configuration.getHeight(502));
			_mainLayout.AddView (linearGradiente);
			_mainLayout.AddView (_linearTitle);

			//_txtTitle_S1.SetX (Configuration.getWidth (245));_txtTitle_S1.SetY (Configuration.getHeight (60));

			Bitmap newbm = Configuration.getRoundedShape(Bitmap.CreateScaledBitmap( getBitmapFromAsset("icons/imgautor.png"), Configuration.getWidth(170), Configuration.getWidth(170), true),Configuration.getWidth(170),Configuration.getHeight(170));
		
			_imAuthor_S1.SetImageBitmap (newbm);
		//	newbm.Recycle ();
			newbm = null;

			_imAuthor_S1.SetX (Configuration.getWidth (240));_imAuthor_S1.SetY (Configuration.getHeight (189));

			LinearLayout _linearAuthor = new LinearLayout (context);
			_linearAuthor.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			_linearAuthor.SetGravity (Android.Views.GravityFlags.Center);
			_linearAuthor.AddView (_txtAuthor_S1);
			_linearAuthor.SetY (Configuration.getHeight (378));
			_mainLayout.AddView (_linearAuthor);

			//_txtAuthor_S1.SetX (Configuration.getWidth (228));_txtAuthor_S1.SetY (Configuration.getHeight (378));

			LinearLayout _linearChapter = new LinearLayout (context);
			_linearChapter.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
//.........这里部分代码省略.........
开发者ID:Milton761,项目名称:MLRepo,代码行数:101,代码来源:WallView.cs

示例14: init


//.........这里部分代码省略.........


			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));
				}

			};
		}
开发者ID:aocsa,项目名称:CInca,代码行数:101,代码来源:LoginView.cs

示例15: init

		public void init(){
			mainLayout = new RelativeLayout (this);
			mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);
			linearButtons = new LinearLayout (this);
			linearImageCamera = new LinearLayout (this);
			LinearImageText = new LinearLayout (this);
			LinearTextCamera = new LinearLayout (this);

			linearButtons.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
			linearImageCamera.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
			LinearImageText.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);
			LinearTextCamera.LayoutParameters = new LinearLayout.LayoutParams (-1, LinearLayout.LayoutParams.WrapContent);

			linearButtons.Orientation = Orientation.Horizontal;
			linearImageCamera.Orientation = Orientation.Horizontal;
			LinearImageText.Orientation = Orientation.Horizontal;
			LinearTextCamera.Orientation = Orientation.Vertical;

			//linearButtons.SetGravity (GravityFlags.Center);
			linearImageCamera.SetGravity (GravityFlags.Center);
			LinearImageText.SetGravity (GravityFlags.Center);
			LinearTextCamera.SetGravity (GravityFlags.Center);

			Drawable dr = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/bfondo.png"), 1024, 768, true));
			mainLayout.SetBackgroundDrawable (dr);

			imgCamera = new ImageView (this);
			imgLineal = new ImageView (this);
			btnCamera = new ImageButton (this);
			btnRepository = new ImageButton (this);
			btnDone = new ImageButton (this);
			txtCamera = new TextView (this);

			txtCamera.Text = "CHOOSE A PICTURE AND \n     SELECT A COLOUR"; 
			txtCamera.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			txtCamera.SetTextSize(Android.Util.ComplexUnitType.Px,Configuration.getHeight(30));

			txtCamera.SetTextColor (Color.ParseColor ("#ffffff"));

			Button bt = new Button (this);


			imgCamera.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/camara.png"), Configuration.getWidth(164),Configuration.getHeight(164),true));
			imgLineal.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/colores.png"), Configuration.getWidth(542), 5,true));
			btnCamera.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/loadcamara.png"), Configuration.getWidth(58),Configuration.getHeight(50),true));
			btnRepository.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/loadbiblioteca.png"), Configuration.getWidth(58),Configuration.getHeight(50),true));
			btnDone.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/adelante.png"), Configuration.getWidth(20),Configuration.getWidth(30),true));

			imgCamera.Click += delegate {
				var com = ((CameraViewModel)this.DataContext).TakePictureCommand;
				com.Execute (null);
			};

			linearButtons.AddView (btnCamera);
			linearButtons.AddView (btnRepository);

			btnCamera.SetPadding (Configuration.getWidth(122),0,0,0);
			btnRepository.SetPadding (Configuration.getWidth(300),0,0,0);

			linearImageCamera.AddView (imgCamera);
			txtCamera.SetPadding (0, Configuration.getHeight(70), 0, 0);
			LinearImageText.AddView (txtCamera);


			LinearTextCamera.AddView (linearImageCamera);
			LinearTextCamera.AddView (LinearImageText);

			LinearTextCamera.SetX (0); LinearTextCamera.SetY (Configuration.getHeight(295));
			linearButtons.SetX (0); linearButtons.SetY (Configuration.getHeight(926));
			imgLineal.SetX (Configuration.getWidth(61)); imgLineal.SetY (Configuration.getHeight(1019));
			btnDone.SetX (Configuration.getWidth(550)); btnDone.SetY (Configuration.getHeight(40));

			mainLayout.AddView (btnDone);
			mainLayout.AddView (LinearTextCamera);
			mainLayout.AddView (linearButtons);
			mainLayout.AddView (imgLineal);
			initButtonColor (btnCamera);
			initButtonColor (btnRepository);
			initButtonColor (btnDone);

			btnCamera.Click += delegate {
				var com = ((CameraViewModel)this.DataContext).TakePictureCommand;
				com.Execute(null);
			};

			btnRepository.Click += delegate {
				var com = ((CameraViewModel)this.DataContext).ChoosePictureCommand;
				com.Execute(null);
			};


			Bitmap bm;
			var vm = this.ViewModel as CameraViewModel;
			if (vm.Bytes != null)
			{
				bm= BitmapFactory.DecodeByteArray(vm.Bytes, 0, vm.Bytes.Length);
				imgCamera.SetImageBitmap (bm); 

			}

//.........这里部分代码省略.........
开发者ID:aocsa,项目名称:eduticnow.droid,代码行数:101,代码来源:CameraView.cs


注:本文中的LinearLayout.SetX方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。