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


C# ImageView.SetY方法代码示例

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


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

示例1: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            //Set appropriate layout.
            SetContentView(Resource.Layout.Tuner);

            tuner = new Tuner();

            //Initialize activity and get the microphone listener thread.
            Thread micThread = CreateMicrophoneRecorder();

            OnMicrophoneFinishedSampling += TunerActivity_OnMicrophoneFinishedSampling;

            //Get screen controls.
            //_volumeBar = FindViewById<ProgressBar>(Resource.Id.volumeBar);
            _closestNote = FindViewById<TextView>(Resource.Id.closestNote);
            _frequencyIndicator = FindViewById<ImageView>(Resource.Id.frequencyIndicator);
            _frequencyGauge = FindViewById<ImageView>(Resource.Id.frequencyGauge);
            _txtFrequency = FindViewById<TextView>(Resource.Id.txtFrequency);

            //Set special position for frequencyIndicator, which is the middle of the screen.
            int haflTheHeightOfTheScreen = Generic.GetScreenDimentions(this).HeightPixels / 2;
            _frequencyIndicator.SetY(haflTheHeightOfTheScreen);
            _frequencyGauge.SetY(haflTheHeightOfTheScreen);

            //Start the microphone listening thread.
            micThread.Start();
        }
开发者ID:sagisprojects,项目名称:Virtual-Guitar-Teacher,代码行数:29,代码来源:TunerActivity.cs

示例2: iniMenu


//.........这里部分代码省略.........
			linearTxtValorBarra.SetGravity (GravityFlags.Center);
			txtValorBarra.Gravity = GravityFlags.Center;

			linearCurse.Orientation = Orientation.Horizontal;
			linearCurse.SetGravity (GravityFlags.CenterVertical);

			linearTask.Orientation = Orientation.Horizontal;
			linearTask.SetGravity (GravityFlags.CenterVertical);

			linearSchool.Orientation = Orientation.Horizontal;
			//linearSchool.SetGravity (GravityFlags.CenterVer);

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

			linearUser.Orientation = Orientation.Vertical;
			linearUser.SetGravity (GravityFlags.CenterHorizontal);

			linearListCurso.Orientation = Orientation.Vertical;
			linearListTask.Orientation = Orientation.Vertical;

			linearList.Orientation = Orientation.Vertical;

			linearPendiente.Orientation = Orientation.Horizontal;
			linearPendiente.SetGravity (GravityFlags.Center);
			//linearList.SetGravity (GravityFlags.CenterVertical);

			progressBar = new ProgressBar (this,null,Android.Resource.Attribute.ProgressBarStyleHorizontal);
			progressBar.LayoutParameters = new ViewGroup.LayoutParams (Configuration.getWidth (274), Configuration.getHeight (32));
			progressBar.ProgressDrawable = Resources.GetDrawable (Resource.Drawable.progressBackground);
			progressBar.Progress = 60;
			txtValorBarra.Text = "60%";
			//progressBar.text
			txtValorBarra.SetY(13);

			txtCurse.Text = "Cursos del 2015";
			txtCurse.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");


		//	txtUserName.Text ="David Spencer";
			txtUserName.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

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

			txtSchoolName.Text ="Colegio Sagrados Corazones";
			txtSchoolName.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			txtPorcentaje.Text = "60%";
			txtPorcentaje.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

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

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

			txtPendiente.Text = "1";
			txtPendiente.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			txtPendiente.SetY (-10);


			txtPendiente.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
			txtUserName.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (35));
			txtUserRol.SetTextSize (Android.Util.ComplexUnitType.Px, Configuration.getHeight (30));
开发者ID:aocsa,项目名称:eduticnow.droid,代码行数:66,代码来源:MainView.cs

示例3: Initialize

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


			adsImagesPath.Add ("images/ad1.jpg");
			adsImagesPath.Add ("images/ad2.jpg");
			adsImagesPath.Add ("images/ad3.jpg");


			_leyendaMap = new ImageView(context);
			_leyendaMapBack = new ImageView(context);
			int w = Configuration.getWidth (25);
			int h = Configuration.getHeight (45);

			_leyendaMap.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/atras.png"), w, h, true));
			_leyendaMap.SetPadding (w, 0, 0, 0);
			_leyendaMap.Click += delegate {
				showLeyenda ();
			};


			leyendaLayout = new RelativeLayout (context);
			leyendaLayout.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(500),Configuration.getHeight(1136-85));
			leyendaLayout.SetBackgroundColor (Color.White);
			leyendaLayout.SetX (Configuration.getWidth (640));
			leyendaLayout.Click += delegate {
				showLeyenda();
			};
			_leyendaImage = new ImageView (context);
			//_leyendaImage.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (500), -1);
			_leyendaImage.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("images/leyenda.png"),Configuration.getWidth (500),Configuration.getWidth(500),true));

			//_leyendaImage.SetX (Configuration.getWidth (141));
			_leyendaImage.SetY (Configuration.getHeight (125));

			_leyendaImage.SetBackgroundColor (Color.Black);



			_leyendaMapBack.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/adelante.png"), w, h, true));
			//_leyendaMapBack.Rotation = 180;
			_leyendaMapBack.SetPadding (w, 0, 0, 0);
			_leyendaMapBack.SetX (Configuration.getWidth (445));
			_leyendaMapBack.SetY (Configuration.getHeight (40));
			_leyendaMapBack.Click += delegate {
				showLeyenda ();
			};

			TextView tituloLeyenda = new TextView (context);
			tituloLeyenda.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (125));
			tituloLeyenda.Gravity = GravityFlags.Center;
			tituloLeyenda.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(38));
			tituloLeyenda.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
			tituloLeyenda.Text = "LEYENDA";

			leyendaLayout.AddView (tituloLeyenda);
			leyendaLayout.AddView (_leyendaImage);
			leyendaLayout.AddView (_leyendaMapBack);



			loadIcons ();
			//loadMapas ();
			ini ();
			//iniNotifList ();
			this.AddView (_mainLayout);

		}
开发者ID:Milton761,项目名称:Hitec.Droid,代码行数:73,代码来源:MapView.cs

示例4: 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

示例5: initUnidades


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

				//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);
					linearUnidad.SetPadding (0, Configuration.getWidth (25),0, Configuration.getWidth (25));

				}

				linearUnidad.AddView (linearContenido);

				if (indexCurso == 0) {
					if (indexUnidad != 3) {

						ImageView info = new ImageView (context);
						info.Tag = i;
						info.SetImageBitmap (iconInfo);
						info.SetX (Configuration.getWidth(450));
						info.SetY (Configuration.getHeight (10));


						linearContenido.AddView (info);

						
						if (indexUnidad == 2 && i > 1 ) {
							
						} else {
							
							LinearLayout test = new LinearLayout (context);
							//test.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
							test.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(100));
							test.SetGravity (Android.Views.GravityFlags.Center);
							test.Tag = i;
							test.SetX( Configuration.getWidth (0));
							test.SetY( Configuration.getWidth (-40));
							//test.SetPadding (Configuration.getWidth(30), Configuration.getWidth (25), Configuration.getWidth(30), Configuration.getWidth (25));

							test.SetGravity (GravityFlags.Left | GravityFlags.Center);

							TextView verMapa = new TextView (context);
							verMapa.Text = Resources.GetText(Resource.String.See_maps_and_photos);
							verMapa.Typeface = Typeface.CreateFromAsset (context.Assets, "fonts/ArcherMediumPro.otf");
							verMapa.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight (35));
							verMapa.SetTextColor (Color.ParseColor (Configuration.ListaColores [i % 6]));

							test.AddView (verMapa);
							linearUnidad.AddView (test);
							_listIconVerMap.Add (test);
						}

					} else {
						titleUnidad.SetTextSize (textFormat,Configuration.getHeight(55));
					}



				}

				if (indexCurso == 1 && indexUnidad==7) {
					linearContenidoIn.RemoveView (titleUnidad);
					linearContenidoIn.RemoveView (descriptionUnidad);
					//linearContenidoIn.LayoutParameters = new LinearLayout.LayoutParams (-2, -2);
					linearContenidoIn.SetX(Configuration.getWidth (0));
					ImageView imgUnidad = new ImageView (context);
					Picasso.With (context).Load (_listUnidades[i].ImageUrl).Resize(Configuration.getWidth(640),Configuration.getHeight(2362)).Placeholder(context.Resources.GetDrawable (Resource.Drawable.progress_animation)).CenterInside().Into (imgUnidad);
					linearContenidoIn.AddView (imgUnidad);
					linearUnidad.SetPadding (0, 0, 0, 0);
					linearUnidad.SetX(Configuration.getWidth (0));
				}



				_listLinearUnidades.Add (linearUnidad);
				LinearLayout separationLinear = new LinearLayout (context);
				separationLinear.LayoutParameters = new LinearLayout.LayoutParams (-1, 5);
				separationLinear.SetBackgroundColor (Color.ParseColor ("#D8D8D8"));
				separationLinear.Orientation = Orientation.Horizontal;


				//linearUnidad.AddView (separationLinear);
				_spaceUnidades.AddView (linearUnidad);
				_spaceUnidades.AddView (separationLinear);
			}
		}
开发者ID:aocsa,项目名称:CInca,代码行数:101,代码来源:WallView.cs

示例6: 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

示例7: initUnidades

		public void initUnidades(int indexCurso, int indexUnidad)
		{
			//this.isFavoritos = false;
			var textFormat = Android.Util.ComplexUnitType.Px;
			_spaceUnidades.RemoveAllViews();
			_listLinearUnidades.Clear();
			_listIconMap.Clear();
			_listIconVerMap.Clear();
			int numUnidades = _listUnidades.Count;
			_mainSpace.SetY(Configuration.getHeight(0));
			try
			{
				_mainSpace.RemoveAllViews();
				_mainSpace.AddView(_fondo2);
				_mainSpace.AddView(_contentScrollView_S2);
				_mainSpace.AddView(mensajeFavoritos);
				_mainSpace.AddView(_spaceUnidades);
			}
			catch (Exception e)
			{
				//ya existe esos hijos
			}
			_mainSpace.SetPadding(0, 0, 0, 0);

			//Color para los LoView
			if (indice_navigator == 0) { Configuration.colorGlobal = Configuration.colorPartida; }//La Partida
			if (indice_navigator == 1) {Configuration.colorGlobal = Configuration.ListaColores50Campamentos[indexUnidad]; }//50 campamentos
			if (indice_navigator == 2) { Configuration.colorGlobal = Configuration.azul; }//Mejores campamentos
			if (indice_navigator == 3) { Configuration.colorGlobal = Configuration.colorExpertos;}//Expertos

			mensajeFavoritos.RemoveAllViews();
			if(indexUnidad==3 || isFavoritos){
				

				//Sacar la lista de Favoritos
				listFavorites = FavoritosItemManager.GetTasks();
				int tam = listFavorites.Count;
				_listUnidades.Clear ();

				////// 
				//MLearning.Core.ViewModels.MainViewModel.lo_by_circle_wrapper currentLearningObject = vm.LearningOjectsList[currentcurso];
				//int circleID = currentLearningObject.lo.Circle_id;
				var tasks = FavoritosItemManager.GetTasks();

				List<int> items = new List<int>();
				foreach (var task in tasks)
				{
					items.Add(task.Id_unidad);
				}
				for (int i = 0; i < tam; i++)
				{
					UnidadItem unItem = new UnidadItem();
					unItem.Description = listFavorites[i].Descripcion;
					unItem.Title = listFavorites[i].Titulo;
					unItem.CurrentSection = listFavorites[i].SectionID;
					unItem.Id = listFavorites[i].Id_unidad;
					unItem.LO_ID = listFavorites[i].LOID; 
					 

					_listUnidades.Add(unItem);
				}
				//this.isFavoritos = true;
					

				vm.bookmarks = items;

				//vm.OpenFavs.Execute(null);

				//_mainSpace.RemoveAllViews();
				//initUnidades(currentcurso, currentunidad);

				//-----------------------------
				numUnidades = _listUnidades.Count;


				//if (numUnidades == 0)
				//{
				//_mainSpace.RemoveAllViews();
				//_mainSpace.SetPadding(Configuration.getWidth(10), 0, Configuration.getWidth(10), 0);
				//


				if (numUnidades == 0) { Toast.MakeText(context, Resources.GetText(Resource.String.listaVaciamismejoresCampamentos), ToastLength.Short).Show(); }
				else { /*Toast.MakeText(context, Resources.GetText(Resource.String.mismejoresCampamentos), ToastLength.Short).Show();*/ }

					TextView txtTmp = new TextView(context);
					//txtTmp.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
				txtTmp.Text = Resources.GetText(Resource.String.agregaCampamentos);
					txtTmp.SetTextSize(ComplexUnitType.Fraction, Configuration.getWidth(34));
				txtTmp.SetTextColor(Color.ParseColor("#616161"));
					mensajeFavoritos.AddView(txtTmp);

					TextView txtTmp2 = new TextView(context);
				txtTmp2.Text = Resources.GetText(Resource.String.completalosCampamentos);
					//txtTmp2.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
					txtTmp2.SetTextColor(Color.ParseColor(Configuration.ListaColores[0 % 6]));
					txtTmp2.SetTextSize(ComplexUnitType.Fraction, Configuration.getWidth(38));
					mensajeFavoritos.AddView(txtTmp2);


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

示例8: 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

示例9: ini

		public void ini(){

			//var textFormat = Android.Util.ComplexUnitType.Px;
			//var textFormatdip = Android.Util.ComplexUnitType.Dip;



			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;

			imgMapa = new ImageView (context);
			titleHeader = new TextView (context);
			content = new TextView (context);

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

			titleHeader.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(38));
			content.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(32));

			//textContent = new LinearLayout (context);
			//textContent.LayoutParameters = new LinearLayout.LayoutParams (-2, -2);


			imgMapa.SetX(Configuration.getWidth (350));
			imgMapa.SetY (Configuration.getHeight (20));
			mainLayout.AddView(imgMapa);


			contenLayout.AddView (titleHeader);
			contenLayout.AddView(content);

			Console.WriteLine ("entro template2");
			int padW = Configuration.getWidth(30);
			int padH = Configuration.getHeight (5);

			mainLayout.SetPadding (padW,padH,padW,padH);
			mainLayout.AddView(contenLayout);
			//mainLayout.SetBackgroundColor (Color.Cyan);

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

示例10: 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

示例11: 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


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