Estoy utilizando un RecyclerView (C# Xamarin.Android
) en donde el adaptador carga desde 2 listas el texto detalle y el thumbnail, respectivamente.
Al ejecutarse se cargan bien los textos, pero no las imágenes, me da error, si le pongo otras imágenes Base64 de prueba algunas si las carga y algunas no, también revise si las imágenes Base64 de los thumbnails originales están bien con un decoder online y ahi si las carga sin problema. No entiendo que pasa.
El error es:
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
Ya revise y este string no lleva dos simbolos =
juntos ni caracteres no permitidos.
Les dejo un ejemplo de como deserializo los thumbnails:
public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
{
try
{
StoriesHolder hh = holder as StoriesHolder;
//Textos
hh.txtTitle.Text = VarGlobal.StoriesTitulo[position];
//Imagen
byte[] image64 = Convert.FromBase64String(imagenBase64);
Bitmap bitmap = BitmapFactory.DecodeByteArray(image64, 0, image64.Length);
hh.imgIcono.SetImageBitmap(bitmap);
hh.itemClickListener = this;
}
catch (Exception Ex)
{
string LineErrorNumber = "Error en linea: " + Ex.StackTrace.Substring(Ex.StackTrace.Length - 7, 7) + "\r\n" + "Error: " + Ex.Message;
}
}
La variable imagenBase64 tiene este string.
/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAHAAcAMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAFAQIDBAYABwj/xAA5EAACAQMCAwUFBgYCAwAAAAABAgMABBEFIQYSMRNBUYGRIjJhcaEUQlLB0fAHFSMzgrFy8RaSov/EABoBAAMBAQEBAAAAAAAAAAAAAAIEBQMBAAb/xAAjEQADAAIBBQACAwA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