private void UpdateTaleAndroidGUI() { mediaPlayerTale.Stop(); frmLytFrontPage.SetBackgroundColor(Color.WhiteSmoke); frmLytFrontPage.SetBackgroundResource(0); imgBackgroundPage.SetImageBitmap(null); if (taleManager != null) { lblFrontPage.Text = taleManager.Title; //-- Background String background = taleManager.Background; int tamBackground = background.Length; if (tamBackground > 0) { if (UtilsAndroid.isArchive(background)) { UtilsImageAndroid.SetImage(background, imgBackgroundFrontPage); } if (background.Contains("#")) { frmLytFrontPage.SetBackgroundColor(Color.ParseColor(background)); } } if (taleManager.Music != "") { mediaPlayerTale = MediaPlayer.Create(this, Android.Net.Uri.Parse(taleManager.Music)); mediaPlayerTale.Start(); } } Application.Dispose(); Application.OnTrimMemory(TrimMemory.RunningCritical); }
private void ChangeToAbsolutePathAndroid2(String location) { //cuento if (taleManager.Background != "" && UtilsAndroid.isArchive(taleManager.Background)) { taleManager.Background = location + "/Imagenes/0/" + taleManager.Background; } if (taleManager.Music != "" && UtilsAndroid.isArchive(taleManager.Music)) { taleManager.Music = location + "/Audios/0/" + taleManager.Music; } //páginas foreach (Page page in taleManager.GetPages) { int numPage = page.Index + 1; if (page.Background != "" && UtilsAndroid.isArchive(page.Background)) { page.Background = location + "/Imagenes/" + numPage + "/" + page.Background; } if (page.Music != "" && UtilsAndroid.isArchive(page.Music)) { page.Music = location + "/Audios/" + numPage + "/" + page.Music; } foreach (Pictogram picto in page.Pictograms) { if (picto.ImageName != "" && UtilsAndroid.isArchive(picto.ImageName)) { picto.ImageName = location + "/Imagenes/" + numPage + "/" + picto.ImageName; } if (picto.Sound != "" && UtilsAndroid.isArchive(picto.Sound)) { picto.Sound = location + "/Audios/" + numPage + "/" + picto.Sound; } } } }