public RelativeLayout getViewSlide() { if (_type == 1) { Template1 plantilla = new Template1(context); plantilla.Title = _title; plantilla.Author = _author; plantilla.Contenido = _paragraph; plantilla.ImageUrl = _imageurl; plantilla.ColorTexto = _colorS; //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 111111"); return(plantilla); } if (_type == 2) { Template2 plantilla = new Template2(context); plantilla.Title = _title; plantilla.Contenido = _paragraph; plantilla.ColorTexto = _colorS; //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 222222"); return(plantilla); } if (_type == 3) { Template3 plantilla = new Template3(context); plantilla.Title = _title; string [] lista = new string[_itemize.Count]; for (int i = 0; i < _itemize.Count; i++) { lista[i] = _itemize[i].Text; } //string[] lista = {"sdfsdf sdfs fsdf sf sdfs"," dfsdfsdf sdfsd fsd ds"," fsdf sfsdf sdfsd"," fdsfsdf sdfsdf sdfsf"}; //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 333333"); plantilla.ListItems = lista; return(plantilla); } if (_type == 4) { Template4 plantilla = new Template4(context); return(plantilla); //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 4444444444"); } if (_type == 5) { PhraseView plantilla = new PhraseView(context); plantilla.Author = _author; plantilla.Phrase = _paragraph; plantilla.ImagenComilla = "icons/comillasa.png"; plantilla.ImagenBarra = "icons/lineafraseamarilla.png"; //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 5"); return(plantilla); } if (_type == 6) { CustomerImageView plantilla = new CustomerImageView(context); plantilla.Title = _title; plantilla.Description = _paragraph; plantilla.Imagen = _imageurl; //BitmapFactory.DecodeByteArray (_imagebytes, 0, _imagebytes.Length); plantilla.ColorTexto = _colorS; return(plantilla); } if (_type == 7) { CustomerVideoView plantilla = new CustomerVideoView(context); plantilla.Title = _title; plantilla.Imagen = _imageurl; plantilla.ImagenPlay = "images/playa.png"; return(plantilla); } return(null); }
public RelativeLayout getViewSlide() { if (_type == 1) { Template1 plantilla = new Template1(context); plantilla.Author = _author; if (_title == null) { _title = ""; } if (!_title.Equals("")) { List <string> elements = parseContent(_title); //Console.WriteLine (String.Format("Holaaaa {0}",elements.Count)); if (elements.Count != 0 && elements[0] == "@") { //Console.WriteLine (elements.ToString()); if (elements[2].Equals("#NONE")) { plantilla.ColorTexto = elements[1]; } else { plantilla.ColorTexto = _colorS; } } } plantilla.Title = _title; plantilla.ImageUrl = _imageurl; //<----------HUILLCA plantilla.Contenido = eraseLastBR(_paragraph);; //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 111111"); return(plantilla); } if (_type == 2) { Template2 plantilla = new Template2(context); if (_title == null) { _title = " "; } List <string> elements = parseContent(_title); //Console.WriteLine (String.Format("Holaaaa {0}",elements.Count)); if (elements.Count != 0 && elements [0] == "@") //Console.WriteLine (elements.ToString()); { if (!elements[2].Equals("#NONE")) { plantilla.ColorDescription = elements[2]; plantilla.ColorTitle = elements[2]; plantilla.ColorBackgroundTemplate = elements[1]; } else { plantilla.ColorTitle = elements[1]; } } else { plantilla.ColorTexto = _colorS; } plantilla.Title = _title; plantilla.Contenido = eraseLastBR(_paragraph); /*Datos básicos*/ if (_title.Equals("Datos básicos ")) { string pathImg = "mapas/" + replaceForImages(title_page) + ".png"; plantilla.Image = getBitmapFromAsset(pathImg); Console.WriteLine(pathImg); } return(plantilla); } if (_type == 3) { Template3 plantilla = new Template3(context); plantilla.Title = _title; string [] lista = new string[_itemize.Count]; for (int i = 0; i < _itemize.Count; i++) { lista[i] = _itemize[i].Text; } plantilla.ListItems = lista; return(plantilla); } if (_type == 4) { Template4 plantilla = new Template4(context); return(plantilla); //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 4444444444"); } if (_type == 5) { PhraseView plantilla = new PhraseView(context); //plantilla.Author = _author; plantilla.Phrase = _paragraph; //plantilla.ImagenComilla = "icons/comillasa.png"; //plantilla.ImagenBarra = "icons/lineafraseamarilla.png"; //Console.WriteLine ("CREA PLANTILLAAAAAAAAA 5"); return(plantilla); } if (_type == 6) { CustomerImageView plantilla = new CustomerImageView(context); plantilla.Title = _title; plantilla.Description = _paragraph; plantilla.Imagen = _imageurl; //BitmapFactory.DecodeByteArray (_imagebytes, 0, _imagebytes.Length); plantilla.ColorTexto = _colorS; return(plantilla); } if (_type == 7) { CustomerVideoView plantilla = new CustomerVideoView(context); plantilla.Title = _title; plantilla.Imagen = _imageurl; plantilla.ImagenPlay = "images/playa.png"; return(plantilla); } return(null); }