I have problem, I am using this answer:https://stackoverflow.com/a/7442725/3569225 to make images url automatically change to images.
But when I try to create the URLImageParser I need to give him context.
I am doing this in the ViewHandler and I dont have there getApplicationContext command.
This is the code I am trying to do:
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
...
UrlImageParser p = new UrlImageParser(holder.message, this);
holder.message.setText(Html.fromHtml(MessageItems.get(position).getMessage()));
...
}
I need to replace 'this' with the context, But I dont have it, What can I do?