From eef085c130d6c0ce733b110d8d94aef7d45accd0 Mon Sep 17 00:00:00 2001 From: gonojuarez Date: Fri, 28 Oct 2022 12:01:02 -0300 Subject: [PATCH] url new function with firebase --- .../stonefacesoft/pictogramslibrary/view/GroupView.java | 6 ++++++ .../stonefacesoft/pictogramslibrary/view/PictoView.java | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/GroupView.java b/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/GroupView.java index e256b15..188885b 100644 --- a/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/GroupView.java +++ b/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/GroupView.java @@ -141,8 +141,14 @@ public void setCustom_Texto(String t) { @Override public void selectIcon() { File picto = new File(pictogramsLibraryGroup.getEditedPictogram()); + File picto2 = picto; + if(!pictogramsLibraryGroup.getEditedPictogram().contains(".debug")) + picto2 = new File(pictogramsLibraryGroup.getEditedPictogram().replace("com.stonefacesoft.ottaa","com.stonefacesoft.ottaa.debug")); if (picto.exists()) glideAttatcher.useDiskCacheStrategy().UseCornerRadius(true).setRadius(25).loadDrawable(picto, this.icon); + else if(picto2.exists()){ + glideAttatcher.useDiskCacheStrategy().UseCornerRadius(true).setRadius(25).loadDrawable(picto2, this.icon); + } else glideAttatcher.useDiskCacheStrategy().UseCornerRadius(true).setRadius(25).loadDrawable(Uri.parse(pictogramsLibraryGroup.getUrl()), this.icon); } diff --git a/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/PictoView.java b/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/PictoView.java index 7112516..af48038 100644 --- a/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/PictoView.java +++ b/app/pictogramslibrary/src/main/java/com/stonefacesoft/pictogramslibrary/view/PictoView.java @@ -81,9 +81,7 @@ private void init() { public void setCustom_Color(Integer color) { this.Custom_Color = color; //Img.setBackgroundColor(color); - Color.setColorFilter(color); - invalidate(); requestLayout(); } @@ -197,8 +195,13 @@ protected Drawable findResource() { public void selectIcon(){ try{ File picto=new File(pictogramsLibraryPictogram.getEditedPictogram()); + File picto2= picto; + if(!pictogramsLibraryPictogram.getEditedPictogram().contains(".debug")) + picto2 =new File(pictogramsLibraryPictogram.getEditedPictogram().replace("com.stonefacesoft.ottaa","com.stonefacesoft.ottaa.debug")); if(picto.exists()) glideAttatcher.useDiskCacheStrategy().loadDrawable(picto,this.icon); + else if(picto2.exists()) + glideAttatcher.useDiskCacheStrategy().loadDrawable(picto2,this.icon); else glideAttatcher.useDiskCacheStrategy().loadDrawable(Uri.parse(pictogramsLibraryPictogram.getUrl()),this.icon); }catch (Exception ex){