Example #1
0
        private void initUi()
        {
            _mainLayout = new RelativeLayout(context);
            _mainLayout.LayoutParameters = new RelativeLayout.LayoutParams(-1, -1);

            _scrollItems = new VerticalScrollView(context);
            _scrollItems.LayoutParameters = new VerticalScrollView.LayoutParams(-1, Configuration.getHeight(965));
            _scrollItems.SetY(Configuration.getHeight(125));

            initItems();
            _scrollItems.AddView(_linearContentLayout);

            _mainLayout.AddView(_scrollItems);
            _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(3));
                }
            };
        }
Example #2
0
        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));

            //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);
            _linearChapter.SetGravity(Android.Views.GravityFlags.Center);
            //_linearChapter.AddView (_txtChapter_S1);
            _linearChapter.SetY(Configuration.getHeight(502));
            //_mainLayout.AddView (_linearChapter);


            //_txtChapter_S1.SetX (Configuration.getWidth (191));_txtChapter_S1.SetY (Configuration.getHeight (502));



            _txtTitle_S1.Text = "Camino Inca";
            _txtTitle_S1.SetTextColor(Color.White);
            _txtTitle_S1.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
            _txtTitle_S1.SetTextSize(textFormat, Configuration.getHeight(30));

            _txtAuthor_S1.Text = "David Spencer";
            _txtAuthor_S1.SetTextColor(Color.White);
            _txtAuthor_S1.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
            _txtAuthor_S1.SetTextSize(textFormat, Configuration.getHeight(30));
            //_txtAuthor_S1.SetBackgroundColor (Color.ParseColor ("#60000000"));
            _txtAuthor_S1.SetShadowLayer(50.8f, 0.0f, 0.0f, Color.ParseColor("#000000"));



            _txtChapter_S1.Text = "FLORA Y FAUNA";
            _txtChapter_S1.SetTextColor(Color.White);
            _txtChapter_S1.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
            _txtChapter_S1.SetTextSize(textFormat, Configuration.getHeight(35));


            List <string> item_path = new List <string> ();

            item_path.Add("icons/icona.png");
            item_path.Add("icons/iconb.png");
            item_path.Add("icons/iconc.png");
            item_path.Add("icons/icond.png");
            item_path.Add("icons/icone.png");
            item_path.Add("icons/iconf.png");
            item_path.Add("icons/icong.png");


            int inixItemIM = Configuration.getWidth(33);
            int crecIM     = Configuration.getWidth(90);

            int inixItemTXT = Configuration.getWidth(42);
            int crecTXT     = Configuration.getWidth(90);
            int inixLinea   = Configuration.getWidth(93);

            for (int i = 0; i < item_path.Count; i++)
            {
                _imItem_S1.Add(new ImageView(context));
                //_imItem_S1[i].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(item_path[i]), Configuration.getWidth (30), Configuration.getWidth (30), true));
                //_mainLayout.AddView (_imItem_S1 [i]);
                _imItem_S1 [i].SetX(inixItemIM + (i * crecIM)); _imItem_S1 [i].SetY(Configuration.getHeight(602));


                if (i != item_path.Count - 1)
                {
                    ImageView linea = new ImageView(context);
                    //linea.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/lineatareas.png"), 1, Configuration.getHeight (68), true));
                    //_mainLayout.AddView (linea);
                    linea.SetX(inixLinea + (i * crecIM));
                    linea.SetY(Configuration.getHeight(605));
                    linea = null;
                }



                _txtItem_S1.Add(new TextView(context));
                _txtItem_S1 [i].Text = "0";
                _txtItem_S1 [i].SetTextColor(Color.ParseColor("#2E9AFE"));
                _txtItem_S1[i].Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
                _txtItem_S1[i].SetTextSize(textFormat, Configuration.getHeight(30));
                //_mainLayout.AddView (_txtItem_S1 [i]);
                _txtItem_S1 [i].SetX(inixItemTXT + (i * crecTXT)); _txtItem_S1 [i].SetY(Configuration.getHeight(640));
                _imItem_S1 [i] = null;
            }
            _imItem_S1 = null;


            //-------------------------------------------------------


            //section2------------------------------------------------

            _contentScrollView_S2 = new HorizontalScrollView(context);
            _contentScrollView_S2.LayoutParameters           = new HorizontalScrollView.LayoutParams(-1, Configuration.getWidth(160));
            _contentScrollView_S2.HorizontalScrollBarEnabled = false;

            _images_S2                  = new LinearLayout(context);
            _images_S2.Orientation      = Orientation.Horizontal;
            _images_S2.LayoutParameters = new LinearLayout.LayoutParams(-2, -1);

            _contentScrollView_S2.SetX(0);


            _contentScrollView_S2.AddView(_images_S2);

            //----------------------------------------------------------

            //section3------------------------------------------------

            _contentLLayout_S3                  = new LinearLayout(context);
            _contentLLayout_S3.Orientation      = Orientation.Vertical;
            _contentLLayout_S3.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(160));
            _contentLLayout_S3.SetX(0); _contentLLayout_S3.SetY(Configuration.getHeight(875));
            _contentLLayout_S3.SetGravity(Android.Views.GravityFlags.Center);



            _txtInfo1_S3 = new TextView(context);
            _txtInfo2_S3 = new TextView(context);
            _txtInfo3_S3 = new TextView(context);

            _txtInfo1_S3.Text = "Duración: 05 dias / 04 noches ";
            _txtInfo2_S3.Text = "Distancia: 65km";
            _txtInfo3_S3.Text = "Punto mas elevado: 4,6386 msnm (Salkantay)";

            _txtInfo1_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;
            _txtInfo2_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;
            _txtInfo3_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;


            _txtInfo1_S3.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
            _txtInfo2_S3.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
            _txtInfo3_S3.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");

            _txtInfo1_S3.SetTextSize(textFormat, Configuration.getHeight(30));
            _txtInfo2_S3.SetTextSize(textFormat, Configuration.getHeight(30));
            _txtInfo3_S3.SetTextSize(textFormat, Configuration.getHeight(30));

            _txtInfo1_S3.SetTextColor(Color.White);
            _txtInfo2_S3.SetTextColor(Color.White);
            _txtInfo3_S3.SetTextColor(Color.White);


            _contentLLayout_S3.AddView(_txtInfo1_S3);
            _contentLLayout_S3.AddView(_txtInfo2_S3);
            _contentLLayout_S3.AddView(_txtInfo3_S3);

            //Drawable dr3 = new BitmapDrawable (getBitmapFromAsset("icons/fondonotif.png"));
            //_contentLLayout_S3.SetBackgroundDrawable(dr3);
            //_contentLLayout_S3.SetBackgroundColor(Color.ParseColor("#80000000"));
            //_mainLayout.AddView (_contentLLayout_S3);

            //_mainLayout.AddView (_contentScrollView_S2);

            _mainSpace.AddView(_contentScrollView_S2);
            //----------------------------------------------------------

            /*
             * _listUnidades.Add(new UnidadItem{ Title = "Dia 1", Description = "Piscacucho-Wayllabamba" });
             * _listUnidades.Add(new UnidadItem{ Title = "Dia 2", Description = "Wayllabamba-Pacaymayo" });
             * _listUnidades.Add(new UnidadItem{ Title = "Dia 3", Description = "Pacaymayo-Wiñay Wayna" });
             * _listUnidades.Add(new UnidadItem{ Title = "Dia 4", Description = "WIñay Wayna-Machu PIcchu"});
             */

            /*
             * _listViewUnidades = new ListView(context);
             * _listViewUnidades.Adapter = new UnidadAdapter (context, _listUnidades);
             *
             * _mainSpace.AddView (_listViewUnidades);
             */

            _spaceUnidades = new LinearLayout(context);
            _spaceUnidades.LayoutParameters = new LinearLayout.LayoutParams(-1, -2);
            _spaceUnidades.Orientation      = Orientation.Vertical;
            _spaceUnidades.SetBackgroundColor(Color.White);
            _mainSpace.AddView(_spaceUnidades);

            //section4------------------------------------------------
            _imItems_S4 = new List <ImageView>();


            List <string> botton_icon_path = new List <string> ();

            botton_icon_path.Add("icons/btnhome.png");
            botton_icon_path.Add("icons/btncomentariosazul.png");
            botton_icon_path.Add("icons/btncontenido.png");
            botton_icon_path.Add("icons/btnchatazul.png");
            botton_icon_path.Add("icons/btnmap.png");

            _imItems_S4.Add(new ImageView(context));
            //_imItems_S4[0].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[0]), Configuration.getWidth (40), Configuration.getWidth (40), true));
            //_mainLayout.AddView (_imItems_S4[0]);
            _imItems_S4[0].SetX(Configuration.getWidth(58)); _imItems_S4[0].SetY(Configuration.getHeight(1069));
            _imItems_S4 [0].Visibility = Android.Views.ViewStates.Invisible;

            _imItems_S4.Add(new ImageView(context));
            //_imItems_S4[1].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[1]), Configuration.getWidth (78), Configuration.getWidth (55), true));
            //_mainLayout.AddView (_imItems_S4[1]);
            _imItems_S4[1].SetX(Configuration.getWidth(169)); _imItems_S4[1].SetY(Configuration.getHeight(1069));
            _imItems_S4 [1].Visibility = Android.Views.ViewStates.Invisible;



            _imItems_S4.Add(new ImageView(context));
            //_imItems_S4[2].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[2]), Configuration.getWidth (80), Configuration.getWidth (80), true));
            //_mainLayout.AddView (_imItems_S4 [2]);
            _imItems_S4[2].SetX(Configuration.getWidth(297)); _imItems_S4[2].SetY(Configuration.getHeight(1050));
            _imItems_S4 [2].Visibility = Android.Views.ViewStates.Invisible;



            _imItems_S4.Add(new ImageView(context));
            //_imItems_S4[3].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[3]), Configuration.getWidth (30), Configuration.getWidth (51), true));
            //_mainLayout.AddView (_imItems_S4[3]);
            _imItems_S4[3].SetX(Configuration.getWidth(421)); _imItems_S4[3].SetY(Configuration.getHeight(1069));
            _imItems_S4 [3].Visibility = Android.Views.ViewStates.Invisible;


            _imItems_S4.Add(new ImageView(context));
            //_imItems_S4[4].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[4]), Configuration.getWidth (30), Configuration.getWidth (40), true));
            //_mainLayout.AddView (_imItems_S4 [4]);
            _imItems_S4[4].SetX(Configuration.getWidth(540)); _imItems_S4[4].SetY(Configuration.getHeight(1069));
            _imItems_S4 [4].Visibility = Android.Views.ViewStates.Invisible;

            //----------------------------------------------------------

            //Drawable dr = new BitmapDrawable (getBitmapFromAsset("images/header1.png"));
            header = new LinearLayout(context);
            header.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(125));
            header.Orientation      = Orientation.Vertical;

            //header.SetBackgroundDrawable (dr);


            //_mainLayout.SetBackgroundDrawable (dr);
            _mainLayout.AddView(header);
            //dr = null;



            _workspace = new LinearLayout(context);
            _workspace.LayoutParameters = new LinearLayout.LayoutParams(-1, -1);
            //_workspace.SetBackgroundColor (Color.ParseColor ("#ffffff"));
            //_workspace.SetY (Configuration.getHeight (110));

            _mainLayout.AddView(_workspace);
            //_mainLayout.SetBackgroundColor (Color.ParseColor ("#ffffff"));
            //_workspace.AddView (_foro);
            //_workspace.Visibility = Android.Views.ViewStates.Invisible;
        }
Example #3
0
		private void initUi()
		{
			_mainLayout = new RelativeLayout (context);
			_mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);

			_scrollItems = new VerticalScrollView (context);
			_scrollItems.LayoutParameters = new VerticalScrollView.LayoutParams (-1, Configuration.getHeight(965));
			_scrollItems.SetY (Configuration.getHeight (125));

			initItems ();
			_scrollItems.AddView (_linearContentLayout);

			_mainLayout.AddView (_scrollItems);
			_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));
				}
			};


		}
Example #4
0
        public void iniPlancesList()
        {
            //_currentPlaces.Clear ();
            _listLinearPlaces.Clear();
            placeSpace.RemoveAllViews();
            placesContainer.RemoveAllViews();

            VerticalScrollView listScrollPlaces = new VerticalScrollView(context);

            listScrollPlaces.LayoutParameters         = new VerticalScrollView.LayoutParams(-1, Configuration.getHeight(345));
            listScrollPlaces.VerticalScrollBarEnabled = false;

            LinearLayout listSpaceLayout = new LinearLayout(context);

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

            for (int i = 0; i < _currentPlaces.Count; i++)
            {
                var item = _currentPlaces [i];

                LinearLayoutLO linearItem = new LinearLayoutLO(context);
                linearItem.index = i;
                TextView  txtName = new TextView(context);
                ImageView imgIcon = new ImageView(context);

                txtName.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(420), -1);
                txtName.Gravity          = GravityFlags.CenterVertical;

                txtName.Text = item.titulo;
                //txtName.SetTextColor (Color.ParseColor ("#ffffff"));
                txtName.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
                txtName.SetTextSize(ComplexUnitType.Fraction, Configuration.getHeight(32));
                //imgIcon.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset (item.Asset), Configuration.getWidth (30), Configuration.getWidth (30), true));

                int H = 80;
                int W = 120;

                linearItem.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(H));
                //linearItem.SetBackgroundDrawable (background_row);
                linearItem.Orientation = Orientation.Horizontal;
                linearItem.SetGravity(Android.Views.GravityFlags.CenterVertical);
                //linearItem.AddView (imgIcon);


                RelativeLayout imageLayout = new RelativeLayout(context);
                imageLayout.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(W), Configuration.getHeight(H));
                ImageView iconImage = new ImageView(context);
                Picasso.With(context).Load(item.pathIcon).Resize(Configuration.getWidth(W), Configuration.getHeight(H)).CenterCrop().Into(iconImage);
                imageLayout.AddView(iconImage);

                LinearLayout gradiente = new LinearLayout(context);
                gradiente.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(W), Configuration.getHeight(H));

                imageLayout.AddView(gradiente);

                ImageIconMap icon = new ImageIconMap(context);
                icon.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(60), Configuration.getWidth(60));

                icon.index = 0;
                icon.SetImageBitmap(_leyendaIcon[item.tipoIndex]);
                //icon.SetPadding (Configuration.getWidth (20), ,0,0);
                icon.SetX(Configuration.getWidth(30));
                icon.SetY(Configuration.getHeight(10));

                RelativeLayout iconLayout = new RelativeLayout(context);
                iconLayout.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(W), Configuration.getHeight(H));
                iconLayout.SetGravity(GravityFlags.Center);

                LinearLayout gradiente2 = new LinearLayout(context);
                gradiente2.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(W), Configuration.getHeight(H));

                iconLayout.AddView(icon);
                iconLayout.AddView(gradiente2);

                linearItem.AddView(imageLayout);
                linearItem.AddView(txtName);
                linearItem.AddView(iconLayout);
                int space = Configuration.getWidth(30);
                //linearItem.SetPadding (space,0,space,0);
                //imgIcon.SetPadding (Configuration.getWidth(68), 0, 0, 0);
                txtName.SetPadding(Configuration.getWidth(10), 0, 0, 0);

                if (i % 2 == 0)
                {
                    gradiente.SetBackgroundResource(Resource.Drawable.gradiente2);
                    gradiente2.SetBackgroundResource(Resource.Drawable.gradiente22);
                    linearItem.SetBackgroundColor(Color.ParseColor("#F0AE11"));
                    txtName.SetTextColor(Color.White);
                }
                else
                {
                    gradiente.SetBackgroundResource(Resource.Drawable.gradiente1);
                    gradiente2.SetBackgroundResource(Resource.Drawable.gradiente11);
                    txtName.SetTextColor(Color.ParseColor("#F0AE11"));
                }

                _listLinearPlaces.Add(linearItem);
                _listLinearPositonPlaces.Add(icon);
                listSpaceLayout.AddView(linearItem);
            }

            /*
             * listPlaces = new ListView (context);
             * listPlaces.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(345));
             *
             * listPlaces.Adapter = new PlaceAdapter (context, _currentPlaces);
             * listPlaces.DividerHeight = 0;
             *
             * placesContainer.AddView (listPlaces);
             */
            placesContainer.AddView(listSpaceLayout);
            placeSpace.AddView(placesContainer);

            titulo_header.Text = titulo_map_header;
            header.AddView(titulo_header);
            header.AddView(_leyendaMap);
        }
Example #5
0
        public void ini()
        {
            Drawable dr = new BitmapDrawable(getBitmapFromAsset("images/1header.png"));

            header = new LinearLayout(context);
            header.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(125));
            header.Orientation      = Orientation.Horizontal;
            header.SetGravity(GravityFlags.Center);
            header.SetBackgroundDrawable(dr);


            titulo_header = new TextView(context);
            titulo_header.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(550), -1);
            titulo_header.SetTextSize(ComplexUnitType.Fraction, Configuration.getHeight(38));
            titulo_header.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
            titulo_header.SetTextColor(Color.White);
            titulo_header.Gravity = GravityFlags.Center;
            //titulo_header.TextAlignment = TextAlignment.Center;

            placesInfoLayout = new LinearLayout(context);
            placesInfoLayout.LayoutParameters = new LinearLayout.LayoutParams(-1, -2);
            int space = Configuration.getWidth(30);

            placesInfoLayout.SetPadding(space, space, space, space);
            placesInfoLayout.Orientation = Orientation.Vertical;

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

            _mainLayout.AddView(header);

            mapImage = new ScaleImageView(context, null);
            mapImage.LayoutParameters = new LinearLayout.LayoutParams(-1, -1);
            mapSpace = new LinearLayout(context);
            mapSpace.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(640), Configuration.getWidth(640));
            mapSpace.SetY(Configuration.getHeight(125));
            mapSpace.SetGravity(GravityFlags.Left);
            mapSpace.SetBackgroundColor(Color.ParseColor("#DFC6BB"));
            mapSpace.AddView(mapImage);

            /*
             * mapImage.PivotX = mapImage.Width/2;
             * mapImage.PivotY = mapImage.Height/2;
             * mapImage.ScaleX = (float)1.5;
             * mapImage.ScaleY = (float)1.5;
             */
            placeSpace = new VerticalScrollView(context);
            placeSpace.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(375 - 85));
            placeSpace.SetY(Configuration.getHeight(125) + Configuration.getWidth(640));
            placeSpace.SetBackgroundColor(Color.White);

            placesContainer = new LinearLayout(context);
            placesContainer.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(375 - 85));
            placesContainer.Orientation      = Orientation.Vertical;


            _mainLayout.AddView(mapSpace);
            _mainLayout.AddView(placeSpace);

            _publicidadLayout = new LinearLayout(context);
            _publicidadLayout.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(85));
            Drawable drp = new BitmapDrawable(getBitmapFromAsset("images/footerad.jpg"));

            _publicidadLayout.SetBackgroundDrawable(drp);
            _publicidadLayout.SetY(Configuration.getHeight(1136 - 85));
            _mainLayout.AddView(_publicidadLayout);
            _publicidadLayout.Click += delegate {
                if (adOpen)
                {
                    hideAd();
                }
                else
                {
                    Random rnd = new Random();
                    showAd(rnd.Next(3));
                }
            };



            _mainLayout.AddView(leyendaLayout);

            scrollPlaces = new VerticalScrollView(context);
            scrollPlaces.LayoutParameters = new VerticalScrollView.LayoutParams(-1, Configuration.getHeight(1136 - 125 - 85));
            scrollPlaces.AddView(placesInfoLayout);
            scrollPlaces.SetY(Configuration.getHeight(125));


            //mainLayout.AddView (placesInfoLayout);

            //iniPlancesList ();
        }
Example #6
0
		public void iniPlancesList()
		{
			//_currentPlaces.Clear ();
			_listLinearPlaces.Clear();
			placeSpace.RemoveAllViews ();
			placesContainer.RemoveAllViews ();

			VerticalScrollView listScrollPlaces = new VerticalScrollView (context);
			listScrollPlaces.LayoutParameters = new VerticalScrollView.LayoutParams (-1, Configuration.getHeight (345));
			listScrollPlaces.VerticalScrollBarEnabled = false;

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

			for (int i = 0; i < _currentPlaces.Count; i++) {

				var item = _currentPlaces [i];

				LinearLayoutLO linearItem = new LinearLayoutLO (context);
				linearItem.index = i;
				TextView txtName = new TextView (context);
				ImageView imgIcon = new ImageView (context);

				txtName.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (420), -1);
				txtName.Gravity = GravityFlags.CenterVertical;

				txtName.Text = item.titulo;
				//txtName.SetTextColor (Color.ParseColor ("#ffffff"));
				txtName.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
				txtName.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(32));
				//imgIcon.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset (item.Asset), Configuration.getWidth (30), Configuration.getWidth (30), true));

				int H = 80;
				int W = 120;

				linearItem.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (H));
				//linearItem.SetBackgroundDrawable (background_row);
				linearItem.Orientation = Orientation.Horizontal;
				linearItem.SetGravity (Android.Views.GravityFlags.CenterVertical);
				//linearItem.AddView (imgIcon);


				RelativeLayout imageLayout = new RelativeLayout (context);
				imageLayout.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (W), Configuration.getHeight (H));
				ImageView iconImage = new ImageView (context);
				Picasso.With (context).Load (item.pathIcon).Resize(Configuration.getWidth(W),Configuration.getHeight(H)).CenterCrop().Into (iconImage);
				imageLayout.AddView (iconImage);

				LinearLayout gradiente = new LinearLayout (context);
				gradiente.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (W), Configuration.getHeight (H));

				imageLayout.AddView (gradiente);

				ImageIconMap icon = new ImageIconMap (context);
				icon.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (60), Configuration.getWidth (60));

				icon.index = 0;
				icon.SetImageBitmap(_leyendaIcon[item.tipoIndex]);
				//icon.SetPadding (Configuration.getWidth (20), ,0,0);
				icon.SetX(Configuration.getWidth (30));
				icon.SetY(Configuration.getHeight (10));

				RelativeLayout iconLayout = new RelativeLayout (context);
				iconLayout.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (W), Configuration.getHeight (H));
				iconLayout.SetGravity (GravityFlags.Center);

				LinearLayout gradiente2 = new LinearLayout (context);
				gradiente2.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (W), Configuration.getHeight (H));

				iconLayout.AddView (icon);
				iconLayout.AddView (gradiente2);

				linearItem.AddView (imageLayout);
				linearItem.AddView (txtName);
				linearItem.AddView (iconLayout);
				int space = Configuration.getWidth (30);
				//linearItem.SetPadding (space,0,space,0);
				//imgIcon.SetPadding (Configuration.getWidth(68), 0, 0, 0);
				txtName.SetPadding (Configuration.getWidth(10), 0, 0, 0);

				if (i % 2 == 0) {
				gradiente.SetBackgroundResource (Resource.Drawable.gradiente2);
				gradiente2.SetBackgroundResource (Resource.Drawable.gradiente22);
				linearItem.SetBackgroundColor (Color.ParseColor ("#F0AE11"));
				txtName.SetTextColor (Color.White);
				} else {
				gradiente.SetBackgroundResource (Resource.Drawable.gradiente1);
				gradiente2.SetBackgroundResource (Resource.Drawable.gradiente11);
				txtName.SetTextColor (Color.ParseColor("#F0AE11"));
				}

				_listLinearPlaces.Add (linearItem);
				_listLinearPositonPlaces.Add (icon);
				listSpaceLayout.AddView (linearItem);

			}

			/*
			listPlaces = new ListView (context);
			listPlaces.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(345));

			listPlaces.Adapter = new PlaceAdapter (context, _currentPlaces);
			listPlaces.DividerHeight = 0;

			placesContainer.AddView (listPlaces);
*/
			placesContainer.AddView (listSpaceLayout);
			placeSpace.AddView(placesContainer);

			titulo_header.Text = titulo_map_header;
			header.AddView (titulo_header);
			header.AddView (_leyendaMap);


		}
Example #7
0
		public void ini(){

			Drawable dr = new BitmapDrawable (getBitmapFromAsset("images/1header.png"));
			header = new LinearLayout(context);
			header.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(125));
			header.Orientation = Orientation.Horizontal;
			header.SetGravity (GravityFlags.Center);
			header.SetBackgroundDrawable (dr);


			titulo_header = new TextView (context);
			titulo_header.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(550), -1);
			titulo_header.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(38));
			titulo_header.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
			titulo_header.SetTextColor (Color.White);
			titulo_header.Gravity = GravityFlags.Center;
			//titulo_header.TextAlignment = TextAlignment.Center;

			placesInfoLayout = new LinearLayout (context);
			placesInfoLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			int space = Configuration.getWidth (30);
			placesInfoLayout.SetPadding(space,space,space,space);
			placesInfoLayout.Orientation = Orientation.Vertical;

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

			_mainLayout.AddView (header);

			mapImage = new ScaleImageView (context, null);
			mapImage.LayoutParameters = new LinearLayout.LayoutParams (-1, -1);
			mapSpace = new LinearLayout (context);
			mapSpace.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(640), Configuration.getWidth(640));
			mapSpace.SetY (Configuration.getHeight (125));
			mapSpace.SetGravity (GravityFlags.Left);
			mapSpace.SetBackgroundColor (Color.ParseColor ("#DFC6BB"));
			//HUILLCA-----------------------------------------
			mapSpaceMarker = new RelativeLayout (context);
			mapSpaceMarker.LayoutParameters = new RelativeLayout.LayoutParams (Configuration.getWidth(640), Configuration.getWidth(640));
			mapSpaceMarker.SetY (Configuration.getHeight (125));
			mapSpaceMarker.SetGravity (GravityFlags.Left);
			mapSpaceMarker.SetBackgroundColor (Color.Transparent);

			iconMarker = new ImageIconMap (context);
			iconMarker.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (60), Configuration.getWidth (60));
			int w = Configuration.getWidth (70);
			int h = Configuration.getWidth (70);
			iconMarker.SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/iconmap12.png"), w, h, true));
			iconMarker.SetX (-100);
			iconMarker.SetY (-100);
			mapSpaceMarker.AddView (iconMarker);

			var fadeIn = new AlphaAnimation(0, 1);
			fadeIn.Interpolator = new AccelerateInterpolator();
			fadeIn.Duration = 1000;

			fadeOut = new AlphaAnimation(1, 0);
			fadeOut.Interpolator = new DecelerateInterpolator();
			fadeOut.Duration = 3000;
			fadeOut.AnimationEnd += (s, e) => 
			{
				 /*ThreadPool.QueueUserWorkItem(state =>
					{
						Thread.Sleep(2000); //wait 2 sec
						//RunOnUiThread(() => iconMarker.StartAnimation(fadeOut));
					});*/
					iconMarker.StartAnimation(fadeIn);
					iconMarker.Visibility = ViewStates.Invisible;
			};
			//-------------------------------------------------------
			mapSpace.AddView (mapImage);



			placeSpace = new VerticalScrollView (context);
			placeSpace.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(375-85));
			placeSpace.SetY (Configuration.getHeight (125)+Configuration.getWidth(640));
			placeSpace.SetBackgroundColor (Color.White);

			placesContainer = new LinearLayout (context);
			placesContainer.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(375-85));
			placesContainer.Orientation = Orientation.Vertical;


			_mainLayout.AddView (mapSpace);
			_mainLayout.AddView (mapSpaceMarker);//HUILLCA
			_mainLayout.AddView (placeSpace);

			_publicidadLayout = new LinearLayout (context);
			_publicidadLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (85));
			Drawable drp = new BitmapDrawable (getBitmapFromAsset ("images/footerad.jpg"));
			_publicidadLayout.SetBackgroundDrawable (drp);
			_publicidadLayout.SetY (Configuration.getHeight(1136-85));
			_mainLayout.AddView (_publicidadLayout);
			_publicidadLayout.Click += delegate {
				if (adOpen) {


					hideAd ();
				} else {
					Random rnd = new Random();
					showAd (rnd.Next(3));
				}
			};



			_mainLayout.AddView (leyendaLayout);

			scrollPlaces = new VerticalScrollView (context);
			scrollPlaces.LayoutParameters = new VerticalScrollView.LayoutParams (-1,Configuration.getHeight(1136-125-85));
			scrollPlaces.AddView (placesInfoLayout);
			scrollPlaces.SetY (Configuration.getHeight (125));


			//mainLayout.AddView (placesInfoLayout);

			//iniPlancesList ();

		}
Example #8
0
		public void ini(){

			Drawable dr = new BitmapDrawable (getBitmapFromAsset("images/1header.png"));
			header = new LinearLayout(context);
			header.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(125));
			header.Orientation = Orientation.Horizontal;
			header.SetGravity (GravityFlags.Center);
			header.SetBackgroundDrawable (dr);


			titulo_header = new TextView (context);
			titulo_header.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(550), -1);
			titulo_header.SetTextSize (ComplexUnitType.Fraction, Configuration.getHeight(38));
			titulo_header.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
			titulo_header.SetTextColor (Color.White);
			titulo_header.Gravity = GravityFlags.Center;
			//titulo_header.TextAlignment = TextAlignment.Center;

			placesInfoLayout = new LinearLayout (context);
			placesInfoLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			int space = Configuration.getWidth (30);
			placesInfoLayout.SetPadding(space,space,space,space);
			placesInfoLayout.Orientation = Orientation.Vertical;

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

			_mainLayout.AddView (header);

			mapImage = new ScaleImageView (context, null);
			mapImage.LayoutParameters = new LinearLayout.LayoutParams (-1, -1);
			mapSpace = new LinearLayout (context);
			mapSpace.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth(640), Configuration.getWidth(640));
			mapSpace.SetY (Configuration.getHeight (125));
			mapSpace.SetGravity (GravityFlags.Left);
			mapSpace.SetBackgroundColor (Color.ParseColor ("#DFC6BB"));
			mapSpace.AddView (mapImage);

			/*
			mapImage.PivotX = mapImage.Width/2;
			mapImage.PivotY = mapImage.Height/2;
			mapImage.ScaleX = (float)1.5;
			mapImage.ScaleY = (float)1.5;
*/
			placeSpace = new VerticalScrollView (context);
			placeSpace.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(375-85));
			placeSpace.SetY (Configuration.getHeight (125)+Configuration.getWidth(640));
			placeSpace.SetBackgroundColor (Color.White);

			placesContainer = new LinearLayout (context);
			placesContainer.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(375-85));
			placesContainer.Orientation = Orientation.Vertical;


			_mainLayout.AddView (mapSpace);
			_mainLayout.AddView (placeSpace);

			_publicidadLayout = new LinearLayout (context);
			_publicidadLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (85));
			Drawable drp = new BitmapDrawable (getBitmapFromAsset ("images/footerad.jpg"));
			_publicidadLayout.SetBackgroundDrawable (drp);
			_publicidadLayout.SetY (Configuration.getHeight(1136-85));
			_mainLayout.AddView (_publicidadLayout);
			_publicidadLayout.Click += delegate {
				if (adOpen) {


					hideAd ();
				} else {
					Random rnd = new Random();
					showAd (rnd.Next(3));
				}
			};



			_mainLayout.AddView (leyendaLayout);

			scrollPlaces = new VerticalScrollView (context);
			scrollPlaces.LayoutParameters = new VerticalScrollView.LayoutParams (-1,Configuration.getHeight(1136-125-85));
			scrollPlaces.AddView (placesInfoLayout);
			scrollPlaces.SetY (Configuration.getHeight (125));


			//mainLayout.AddView (placesInfoLayout);

			//iniPlancesList ();

		}
Example #9
0
		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));

			//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);
			_linearChapter.SetGravity (Android.Views.GravityFlags.Center);
			//_linearChapter.AddView (_txtChapter_S1);
			_linearChapter.SetY (Configuration.getHeight (502));
			//_mainLayout.AddView (_linearChapter);


			//_txtChapter_S1.SetX (Configuration.getWidth (191));_txtChapter_S1.SetY (Configuration.getHeight (502));






			_txtTitle_S1.Text = "Camino Inca";
			_txtTitle_S1.SetTextColor (Color.White);
			_txtTitle_S1.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtTitle_S1.SetTextSize (textFormat,Configuration.getHeight(30));

			_txtAuthor_S1.Text = "David Spencer";
			_txtAuthor_S1.SetTextColor (Color.White);
			_txtAuthor_S1.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtAuthor_S1.SetTextSize (textFormat,Configuration.getHeight(30));
			//_txtAuthor_S1.SetBackgroundColor (Color.ParseColor ("#60000000"));
			_txtAuthor_S1.SetShadowLayer (50.8f, 0.0f, 0.0f, Color.ParseColor ("#000000"));



			_txtChapter_S1.Text = "FLORA Y FAUNA";
			_txtChapter_S1.SetTextColor (Color.White);
			_txtChapter_S1.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtChapter_S1.SetTextSize (textFormat,Configuration.getHeight(35));


			List<string> item_path = new List<string> ();
			item_path.Add ("icons/icona.png");
			item_path.Add ("icons/iconb.png");
			item_path.Add ("icons/iconc.png");
			item_path.Add ("icons/icond.png");
			item_path.Add ("icons/icone.png");
			item_path.Add ("icons/iconf.png");
			item_path.Add ("icons/icong.png");


			int inixItemIM = Configuration.getWidth (33);
			int crecIM = Configuration.getWidth (90);

			int inixItemTXT = Configuration.getWidth (42);
			int crecTXT = Configuration.getWidth (90);
			int inixLinea = Configuration.getWidth (93);

			for (int i = 0; i < item_path.Count; i++) {

				_imItem_S1.Add(new ImageView(context));
				//_imItem_S1[i].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(item_path[i]), Configuration.getWidth (30), Configuration.getWidth (30), true));
				//_mainLayout.AddView (_imItem_S1 [i]);
				_imItem_S1 [i].SetX (inixItemIM+(i*crecIM));_imItem_S1 [i].SetY (Configuration.getHeight(602));


				if (i != item_path.Count - 1) {
					ImageView linea = new ImageView (context);
					//linea.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/lineatareas.png"), 1, Configuration.getHeight (68), true));
					//_mainLayout.AddView (linea);
					linea.SetX (inixLinea + (i * crecIM));
					linea.SetY (Configuration.getHeight (605));
					linea = null;
				}



				_txtItem_S1.Add (new TextView (context));
				_txtItem_S1 [i].Text = "0";
				_txtItem_S1 [i].SetTextColor (Color.ParseColor ("#2E9AFE"));
				_txtItem_S1[i].Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
				_txtItem_S1[i].SetTextSize (textFormat,Configuration.getHeight(30));
				//_mainLayout.AddView (_txtItem_S1 [i]);
				_txtItem_S1 [i].SetX (inixItemTXT+(i*crecTXT));_txtItem_S1 [i].SetY (Configuration.getHeight(640));
				_imItem_S1 [i] = null;

			}
			_imItem_S1 = null;


			//-------------------------------------------------------


			//section2------------------------------------------------

			_contentScrollView_S2 = new HorizontalScrollView (context);
			_contentScrollView_S2.LayoutParameters = new HorizontalScrollView.LayoutParams (-1, Configuration.getWidth(160));
			_contentScrollView_S2.HorizontalScrollBarEnabled = false;

			_images_S2 = new LinearLayout (context);
			_images_S2.Orientation = Orientation.Horizontal;
			_images_S2.LayoutParameters = new LinearLayout.LayoutParams(-2,-1);

			_contentScrollView_S2.SetX (0);


			_contentScrollView_S2.AddView (_images_S2);

			//----------------------------------------------------------

			//section3------------------------------------------------

			_contentLLayout_S3 = new LinearLayout (context);
			_contentLLayout_S3.Orientation = Orientation.Vertical;
			_contentLLayout_S3.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (160));
			_contentLLayout_S3.SetX (0);_contentLLayout_S3.SetY (Configuration.getHeight(875));
			_contentLLayout_S3.SetGravity (Android.Views.GravityFlags.Center);



			_txtInfo1_S3 = new TextView (context);
			_txtInfo2_S3 = new TextView (context);
			_txtInfo3_S3 = new TextView (context);

			_txtInfo1_S3.Text = "Duración: 05 dias / 04 noches ";
			_txtInfo2_S3.Text = "Distancia: 65km";
			_txtInfo3_S3.Text = "Punto mas elevado: 4,6386 msnm (Salkantay)";

			_txtInfo1_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;
			_txtInfo2_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;
			_txtInfo3_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;


			_txtInfo1_S3.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtInfo2_S3.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtInfo3_S3.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");

			_txtInfo1_S3.SetTextSize (textFormat,Configuration.getHeight(30));
			_txtInfo2_S3.SetTextSize (textFormat,Configuration.getHeight(30));
			_txtInfo3_S3.SetTextSize (textFormat,Configuration.getHeight(30));

			_txtInfo1_S3.SetTextColor (Color.White);
			_txtInfo2_S3.SetTextColor (Color.White);
			_txtInfo3_S3.SetTextColor (Color.White);


			_contentLLayout_S3.AddView (_txtInfo1_S3);
			_contentLLayout_S3.AddView (_txtInfo2_S3);
			_contentLLayout_S3.AddView (_txtInfo3_S3);

			//Drawable dr3 = new BitmapDrawable (getBitmapFromAsset("icons/fondonotif.png"));
			//_contentLLayout_S3.SetBackgroundDrawable(dr3);
			//_contentLLayout_S3.SetBackgroundColor(Color.ParseColor("#80000000"));
			//_mainLayout.AddView (_contentLLayout_S3);

			//_mainLayout.AddView (_contentScrollView_S2);

			_mainSpace.AddView (_contentScrollView_S2);
			//----------------------------------------------------------
			/*
			_listUnidades.Add(new UnidadItem{ Title = "Dia 1", Description = "Piscacucho-Wayllabamba" });
			_listUnidades.Add(new UnidadItem{ Title = "Dia 2", Description = "Wayllabamba-Pacaymayo" });
			_listUnidades.Add(new UnidadItem{ Title = "Dia 3", Description = "Pacaymayo-Wiñay Wayna" });
			_listUnidades.Add(new UnidadItem{ Title = "Dia 4", Description = "WIñay Wayna-Machu PIcchu"});
		*/

			/*
			_listViewUnidades = new ListView(context);
			_listViewUnidades.Adapter = new UnidadAdapter (context, _listUnidades);

			_mainSpace.AddView (_listViewUnidades);
			*/

			_spaceUnidades = new LinearLayout (context);
			_spaceUnidades.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			_spaceUnidades.Orientation = Orientation.Vertical;
			_spaceUnidades.SetBackgroundColor (Color.White);
			_mainSpace.AddView (_spaceUnidades);

			//section4------------------------------------------------
			_imItems_S4 = new List<ImageView>();


			List<string> botton_icon_path = new List<string> ();
			botton_icon_path.Add ("icons/btnhome.png");
			botton_icon_path.Add ("icons/btncomentariosazul.png");
			botton_icon_path.Add ("icons/btncontenido.png");
			botton_icon_path.Add ("icons/btnchatazul.png");
			botton_icon_path.Add ("icons/btnmap.png");

			_imItems_S4.Add (new ImageView (context));
			//_imItems_S4[0].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[0]), Configuration.getWidth (40), Configuration.getWidth (40), true));
			//_mainLayout.AddView (_imItems_S4[0]);
			_imItems_S4[0].SetX (Configuration.getWidth(58));_imItems_S4[0].SetY (Configuration.getHeight(1069));
			_imItems_S4 [0].Visibility = Android.Views.ViewStates.Invisible;

			_imItems_S4.Add (new ImageView (context));
			//_imItems_S4[1].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[1]), Configuration.getWidth (78), Configuration.getWidth (55), true));
			//_mainLayout.AddView (_imItems_S4[1]);
			_imItems_S4[1].SetX (Configuration.getWidth(169));_imItems_S4[1].SetY (Configuration.getHeight(1069));
			_imItems_S4 [1].Visibility = Android.Views.ViewStates.Invisible;




			_imItems_S4.Add (new ImageView (context));
			//_imItems_S4[2].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[2]), Configuration.getWidth (80), Configuration.getWidth (80), true));
			//_mainLayout.AddView (_imItems_S4 [2]);
			_imItems_S4[2].SetX (Configuration.getWidth(297));_imItems_S4[2].SetY (Configuration.getHeight(1050));
			_imItems_S4 [2].Visibility = Android.Views.ViewStates.Invisible;



			_imItems_S4.Add (new ImageView (context));
			//_imItems_S4[3].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[3]), Configuration.getWidth (30), Configuration.getWidth (51), true));
			//_mainLayout.AddView (_imItems_S4[3]);
			_imItems_S4[3].SetX (Configuration.getWidth(421));_imItems_S4[3].SetY (Configuration.getHeight(1069));
			_imItems_S4 [3].Visibility = Android.Views.ViewStates.Invisible;


			_imItems_S4.Add (new ImageView (context));
			//_imItems_S4[4].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[4]), Configuration.getWidth (30), Configuration.getWidth (40), true));
			//_mainLayout.AddView (_imItems_S4 [4]);
			_imItems_S4[4].SetX (Configuration.getWidth(540));_imItems_S4[4].SetY (Configuration.getHeight(1069));
			_imItems_S4 [4].Visibility = Android.Views.ViewStates.Invisible;

			//----------------------------------------------------------

			//Drawable dr = new BitmapDrawable (getBitmapFromAsset("images/header1.png"));
			header = new LinearLayout(context);
			header.LayoutParameters = new LinearLayout.LayoutParams (-1,Configuration.getHeight(125));
			header.Orientation = Orientation.Vertical;

			//header.SetBackgroundDrawable (dr);


			//_mainLayout.SetBackgroundDrawable (dr);
			_mainLayout.AddView(header);
			//dr = null;






			_workspace = new LinearLayout (context);
			_workspace.LayoutParameters = new LinearLayout.LayoutParams (-1, -1);
			//_workspace.SetBackgroundColor (Color.ParseColor ("#ffffff"));
			//_workspace.SetY (Configuration.getHeight (110));

			_mainLayout.AddView (_workspace);
			//_mainLayout.SetBackgroundColor (Color.ParseColor ("#ffffff"));
			//_workspace.AddView (_foro);
			//_workspace.Visibility = Android.Views.ViewStates.Invisible;


		}
Example #10
0
        public void ini()
        {
            Drawable dr = new BitmapDrawable(getBitmapFromAsset("images/1header.png"));

            header = new LinearLayout(context);
            header.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(125));
            header.Orientation      = Orientation.Horizontal;
            header.SetGravity(GravityFlags.Center);
            header.SetBackgroundDrawable(dr);


            titulo_header = new TextView(context);
            titulo_header.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(550), -1);
            titulo_header.SetTextSize(ComplexUnitType.Fraction, Configuration.getHeight(38));
            titulo_header.Typeface = Typeface.CreateFromAsset(context.Assets, "fonts/ArcherMediumPro.otf");
            titulo_header.SetTextColor(Color.White);
            titulo_header.Gravity = GravityFlags.Center;
            //titulo_header.TextAlignment = TextAlignment.Center;

            placesInfoLayout = new LinearLayout(context);
            placesInfoLayout.LayoutParameters = new LinearLayout.LayoutParams(-1, -2);
            int space = Configuration.getWidth(30);

            placesInfoLayout.SetPadding(space, space, space, space);
            placesInfoLayout.Orientation = Orientation.Vertical;

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

            _mainLayout.AddView(header);

            mapImage = new ScaleImageView(context, null);
            mapImage.LayoutParameters = new LinearLayout.LayoutParams(-1, -1);
            mapSpace = new LinearLayout(context);
            mapSpace.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(640), Configuration.getWidth(640));
            mapSpace.SetY(Configuration.getHeight(125));
            mapSpace.SetGravity(GravityFlags.Left);
            mapSpace.SetBackgroundColor(Color.ParseColor("#DFC6BB"));

            //HUILLCA-----------------------------------------
            mapSpaceMarker = new RelativeLayout(context);
            mapSpaceMarker.LayoutParameters = new RelativeLayout.LayoutParams(Configuration.getWidth(640), Configuration.getWidth(640));
            mapSpaceMarker.SetY(Configuration.getHeight(125));
            mapSpaceMarker.SetGravity(GravityFlags.Left);
            mapSpaceMarker.SetBackgroundColor(Color.Transparent);

            iconMarker = new ImageIconMap(context);
            iconMarker.LayoutParameters = new LinearLayout.LayoutParams(Configuration.getWidth(40), Configuration.getWidth(40));
            int w = Configuration.getWidth(40);
            int h = Configuration.getWidth(40);

            iconMarker.SetImageBitmap(Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/iconmap12.png"), w, h, true));
            iconMarker.SetX(-100);
            iconMarker.SetY(-100);
            iconMarker.SetAlpha(185);             //hace que la imagen sea mas transparente
            mapSpaceMarker.AddView(iconMarker);

            var fadeIn = new AlphaAnimation(0, 1);

            fadeIn.Interpolator = new AccelerateInterpolator();
            fadeIn.Duration     = 1000;

            fadeOut = new AlphaAnimation(1, 0);
            fadeOut.Interpolator  = new DecelerateInterpolator();
            fadeOut.Duration      = 3000;
            fadeOut.AnimationEnd += (s, e) =>
            {
                /*ThreadPool.QueueUserWorkItem(state =>
                 *     {
                 *             Thread.Sleep(2000); //wait 2 sec
                 *             //RunOnUiThread(() => iconMarker.StartAnimation(fadeOut));
                 *     });*/
                iconMarker.StartAnimation(fadeIn);
                iconMarker.Visibility = ViewStates.Invisible;
            };
            //-------------------------------------------------------
            mapSpace.AddView(mapImage);



            placeSpace = new VerticalScrollView(context);
            placeSpace.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(375 - 85));
            placeSpace.SetY(Configuration.getHeight(125) + Configuration.getWidth(640));
            placeSpace.SetBackgroundColor(Color.White);

            placesContainer = new LinearLayout(context);
            placesContainer.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(375 - 85));
            placesContainer.Orientation      = Orientation.Vertical;


            _mainLayout.AddView(mapSpace);
            _mainLayout.AddView(mapSpaceMarker);             //HUILLCA
            _mainLayout.AddView(placeSpace);

            _publicidadLayout = new LinearLayout(context);
            _publicidadLayout.LayoutParameters = new LinearLayout.LayoutParams(-1, Configuration.getHeight(85));
            Drawable drp = new BitmapDrawable(getBitmapFromAsset("images/footerad.jpg"));

            _publicidadLayout.SetBackgroundDrawable(drp);
            _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));
                }
            };



            _mainLayout.AddView(leyendaLayout);

            scrollPlaces = new VerticalScrollView(context);
            scrollPlaces.LayoutParameters = new VerticalScrollView.LayoutParams(-1, Configuration.getHeight(1136 - 125 - 85));
            scrollPlaces.AddView(placesInfoLayout);
            scrollPlaces.SetY(Configuration.getHeight(125));


            //mainLayout.AddView (placesInfoLayout);

            //iniPlancesList ();
        }
Example #11
0
		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);
			_linearChapter.SetGravity (Android.Views.GravityFlags.Center);
			_linearChapter.AddView (_txtChapter_S1);
			_linearChapter.SetY (Configuration.getHeight (502));
			_mainLayout.AddView (_linearChapter);


			//_txtChapter_S1.SetX (Configuration.getWidth (191));_txtChapter_S1.SetY (Configuration.getHeight (502));






			_txtTitle_S1.Text = "Camino Inca";
			_txtTitle_S1.SetTextColor (Color.White);
			_txtTitle_S1.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtTitle_S1.SetTextSize (textFormat,Configuration.getHeight(30));

			_txtAuthor_S1.Text = "David Spencer";
			_txtAuthor_S1.SetTextColor (Color.White);
			_txtAuthor_S1.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtAuthor_S1.SetTextSize (textFormat,Configuration.getHeight(30));
			//_txtAuthor_S1.SetBackgroundColor (Color.ParseColor ("#60000000"));
			_txtAuthor_S1.SetShadowLayer (50.8f, 0.0f, 0.0f, Color.ParseColor ("#000000"));



			_txtChapter_S1.Text = "FLORA Y FAUNA";
			_txtChapter_S1.SetTextColor (Color.White);
			_txtChapter_S1.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtChapter_S1.SetTextSize (textFormat,Configuration.getHeight(35));


			List<string> item_path = new List<string> ();
			item_path.Add ("icons/icona.png");
			item_path.Add ("icons/iconb.png");
			item_path.Add ("icons/iconc.png");
			item_path.Add ("icons/icond.png");
			item_path.Add ("icons/icone.png");
			item_path.Add ("icons/iconf.png");
			item_path.Add ("icons/icong.png");


			int inixItemIM = Configuration.getWidth (33);
			int crecIM = Configuration.getWidth (90);

			int inixItemTXT = Configuration.getWidth (42);
			int crecTXT = Configuration.getWidth (90);
			int inixLinea = Configuration.getWidth (93);

			for (int i = 0; i < item_path.Count; i++) {
				
				_imItem_S1.Add(new ImageView(context));
				_imItem_S1[i].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(item_path[i]), Configuration.getWidth (30), Configuration.getWidth (30), true));
				_mainLayout.AddView (_imItem_S1 [i]);
				_imItem_S1 [i].SetX (inixItemIM+(i*crecIM));_imItem_S1 [i].SetY (Configuration.getHeight(602));


				if (i != item_path.Count - 1) {
					ImageView linea = new ImageView (context);
					linea.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/lineatareas.png"), 1, Configuration.getHeight (68), true));
					_mainLayout.AddView (linea);
					linea.SetX (inixLinea + (i * crecIM));
					linea.SetY (Configuration.getHeight (605));
					linea = null;
				}



				_txtItem_S1.Add (new TextView (context));
				_txtItem_S1 [i].Text = "0";
				_txtItem_S1 [i].SetTextColor (Color.ParseColor ("#2E9AFE"));
				_txtItem_S1[i].Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
				_txtItem_S1[i].SetTextSize (textFormat,Configuration.getHeight(30));
				_mainLayout.AddView (_txtItem_S1 [i]);
				_txtItem_S1 [i].SetX (inixItemTXT+(i*crecTXT));_txtItem_S1 [i].SetY (Configuration.getHeight(640));
				_imItem_S1 [i] = null;

			}
			_imItem_S1 = null;


			//-------------------------------------------------------


			//section2------------------------------------------------

			_contentScrollView_S2 = new HorizontalScrollView (context);
			_contentScrollView_S2.LayoutParameters = new HorizontalScrollView.LayoutParams (-1, Configuration.getWidth(160));
			_contentScrollView_S2.HorizontalScrollBarEnabled = false;

			_images_S2 = new LinearLayout (context);
			_images_S2.Orientation = Orientation.Horizontal;
			_images_S2.LayoutParameters = new LinearLayout.LayoutParams(-2,-1);

			_contentScrollView_S2.SetX (0);
			_contentScrollView_S2.SetY (Configuration.getHeight (700));


			_contentScrollView_S2.AddView (_images_S2);

			//----------------------------------------------------------

			//section3------------------------------------------------

			_contentLLayout_S3 = new VerticalScrollView (context);
			_contentLLayout_S3.LayoutParameters = new VerticalScrollView.LayoutParams (-1, Configuration.getWidth(160));
 

			_contentLLayout_S3.SetX (0);
			_contentLLayout_S3.SetY (Configuration.getHeight(875));
			_contentLLayout_S3.VerticalScrollBarEnabled = false;


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

			_contentLLayout_S3.AddView (_index_list);


			_txtInfo1_S3 = new TextView (context);
			_txtInfo2_S3 = new TextView (context);
			_txtInfo3_S3 = new TextView (context);

			_txtInfo1_S3.Text = "Duración: 05 dias / 04 noches ";
			_txtInfo2_S3.Text = "Distancia: 65km";
			_txtInfo3_S3.Text = "Punto mas elevado: 4,6386 msnm (Salkantay)";

			_txtInfo1_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;
			_txtInfo2_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;
			_txtInfo3_S3.Gravity = Android.Views.GravityFlags.CenterHorizontal;


			_txtInfo1_S3.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtInfo2_S3.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			_txtInfo3_S3.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");

			_txtInfo1_S3.SetTextSize (textFormat,Configuration.getHeight(30));
			_txtInfo2_S3.SetTextSize (textFormat,Configuration.getHeight(30));
			_txtInfo3_S3.SetTextSize (textFormat,Configuration.getHeight(30));

			_txtInfo1_S3.SetTextColor (Color.White);
			_txtInfo2_S3.SetTextColor (Color.White);
			_txtInfo3_S3.SetTextColor (Color.White);


			//_contentLLayout_S3.AddView (_txtInfo1_S3);
			//_contentLLayout_S3.AddView (_txtInfo2_S3);
			//_contentLLayout_S3.AddView (_txtInfo3_S3);

			//Drawable dr3 = new BitmapDrawable (getBitmapFromAsset("icons/fondonotif.png"));
			//_contentLLayout_S3.SetBackgroundDrawable(dr3);
				//_contentLLayout_S3.SetBackgroundColor(Color.ParseColor("#80000000"));
			_mainLayout.AddView (_contentLLayout_S3);
			_mainLayout.AddView (_contentScrollView_S2);

			//----------------------------------------------------------

			//section4------------------------------------------------
			_imItems_S4 = new List<ImageView>();


			List<string> botton_icon_path = new List<string> ();
			botton_icon_path.Add ("icons/btnunidadesazul.png");
			botton_icon_path.Add ("icons/btncomentariosazul.png");
			botton_icon_path.Add ("icons/btncontenidoazul.png");
			botton_icon_path.Add ("icons/btnchatazul.png");
			botton_icon_path.Add ("icons/btntareasazul.png");

			_imItems_S4.Add (new ImageView (context));
			_imItems_S4[0].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[0]), Configuration.getWidth (60), Configuration.getWidth (54), true));
			_mainLayout.AddView (_imItems_S4[0]);
			_imItems_S4[0].SetX (Configuration.getWidth(58));_imItems_S4[0].SetY (Configuration.getHeight(1069));

			_imItems_S4.Add (new ImageView (context));
			_imItems_S4[1].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[1]), Configuration.getWidth (78), Configuration.getWidth (55), true));
			_mainLayout.AddView (_imItems_S4[1]);
			_imItems_S4[1].SetX (Configuration.getWidth(169));_imItems_S4[1].SetY (Configuration.getHeight(1069));



			_imItems_S4.Add (new ImageView (context));
			_imItems_S4[2].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[2]), Configuration.getWidth (60), Configuration.getWidth (60), true));
			_mainLayout.AddView (_imItems_S4 [2]);
			_imItems_S4[2].SetX (Configuration.getWidth(297));_imItems_S4[2].SetY (Configuration.getHeight(1069));



			_imItems_S4.Add (new ImageView (context));
			_imItems_S4[3].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[3]), Configuration.getWidth (30), Configuration.getWidth (51), true));
			_mainLayout.AddView (_imItems_S4[3]);
			_imItems_S4[3].SetX (Configuration.getWidth(421));_imItems_S4[3].SetY (Configuration.getHeight(1069));


			_imItems_S4.Add (new ImageView (context));
			_imItems_S4[4].SetImageBitmap(Bitmap.CreateScaledBitmap (getBitmapFromAsset(botton_icon_path[4]), Configuration.getWidth (41), Configuration.getWidth (50), true));
			_mainLayout.AddView (_imItems_S4 [4]);
			_imItems_S4[4].SetX (Configuration.getWidth(540));_imItems_S4[4].SetY (Configuration.getHeight(1069));

			//----------------------------------------------------------


			
			Drawable dr = new BitmapDrawable (getBitmapFromAsset("icons/fondo.png"));
			_mainLayout.SetBackgroundDrawable (dr);
			dr = null;
		
			_workspace = new LinearLayout (context);
			_workspace.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight (1045));
			//_workspace.SetY (Configuration.getHeight (110));

			_mainLayout.AddView (_workspace);
			//_workspace.AddView (_foro);
			//_workspace.Visibility = Android.Views.ViewStates.Invisible;


		}