use of forpdateam.ru.forpda.ui.views.messagepanel.advanced.ButtonData in project ForPDA by RadiationX.
the class PanelItemAdapter method onBindViewHolder.
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
ButtonData item = items.get(position);
if (type == TYPE_ASSET) {
ImageLoader.getInstance().loadImage(urlsToAssets.get(position), new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
holder.button.setImageBitmap(loadedImage);
}
});
} else if (type == TYPE_DRAWABLE) {
holder.button.setImageDrawable(App.getVecDrawable(holder.itemView.getContext(), item.getIconRes()));
// holder.button.setColorFilter(colorFilter);
}
if (item.getTitle() == null) {
holder.title.setVisibility(View.GONE);
holder.itemView.setContentDescription(item.getText());
} else {
holder.itemView.setContentDescription(item.getTitle());
holder.title.setText(item.getTitle());
holder.title.setVisibility(View.VISIBLE);
}
}
Aggregations