I'm using SmartImageView in my layout and setting the URL as below
header.setImageUrl(welcomeScreen._headerImageUri, new SmartImageTask.OnCompleteListener() {
@Override
public void onComplete() {
int height = 0;
if (header.getDrawable() != null) {
height = (int) Math.round(((double) header.getWidth()) * ((double) header.getDrawable().getIntrinsicHeight()) / ((double) header.getDrawable().getIntrinsicWidth()));
}
header.setLayoutParams(new RelativeLayout.LayoutParams(header.getWidth(), height + 1));
}
});
The Layout params is set and my header occupies the space. But the image is not showing. I don't get whatI'm doing wrong