Skip to content

Commit

Permalink
version 0.1.8.18
Browse files Browse the repository at this point in the history
prerelease
  • Loading branch information
gonojuarez committed Aug 10, 2021
1 parent 94fe7e8 commit ee8ea7b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public void setUpPictogram(){
this.id=manager.JsonObjectGetInt(object,"id","PictogramLibrary");
}



public void setLocale(String locale) {
this.locale = locale;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,25 @@ private void setData(){
else
glideAttatcher.useDiskCacheStrategy().loadDrawable(Uri.parse(pictogramsLibraryGroup.getUrl()),this.icon);
}
loadPictogram(pictogramsLibraryGroup.getLocation(),this.getResources().getDrawable(R.drawable.ic_location_on_black_24dp),this.getResources().getDrawable(R.drawable.ic_location_off_black_24dp),tagUbicacion);
loadPictogram(pictogramsLibraryGroup.getAge(),this.getResources().getDrawable(R.drawable.ic_baseline_wc_24),this.getResources().getDrawable(R.drawable.ic_baseline_disable_24),tagSexo);
loadPictogram(pictogramsLibraryGroup.getGender(),this.getResources().getDrawable(R.drawable.ic_face_black_on_24dp),this.getResources().getDrawable(R.drawable.ic_location_off_black_24dp),tagEdad);
loadPictogram(pictogramsLibraryGroup.getHour(),this.getResources().getDrawable(R.drawable.ic_timer_black_24dp),this.getResources().getDrawable(R.drawable.ic_timer_off_black_24dp),tagHora);
}
}

public void loadHourIcon(boolean value){
tagHora.setImageResource(value?R.drawable.ic_timer_black_24dp:R.drawable.ic_timer_off_black_24dp);
}
public void loadGenderIcon(boolean value){
tagSexo.setImageResource(value?R.drawable.ic_baseline_wc_24:R.drawable.ic_baseline_disable_24);

}
public void loadLocationIcon(boolean value){
tagUbicacion.setImageResource(value?R.drawable.ic_location_on_black_24dp:R.drawable.ic_location_off_black_24dp);
}

public void loadAgeIcon(boolean value){
tagUbicacion.setImageResource(value?R.drawable.ic_face_black_on_24dp:R.drawable.ic_face_black_24dp);

}


private void loadPictogram(JSONArray array,Drawable drawable,Drawable drawableFalse,ImageView view){
if(array.length() != 0)
view.setImageDrawable(drawable);
else
view.setImageDrawable(drawableFalse);
}

public void setCustom_Texto(String t) {
this.Custom_Texto = t;
Expand Down

0 comments on commit ee8ea7b

Please sign in to comment.