I want to create imageView like this below (with the focus on red background).
If the image gets a null data, then, imageView shows the text with split after spacing
Is that possible to do ?
I want to create imageView like this below (with the focus on red background).
If the image gets a null data, then, imageView shows the text with split after spacing
Is that possible to do ?
You can use Picaso or Glide Imageloader library, in which you can use placeholder image, placeholder image will be displayed when your image is not loaded or your data will be null.
You can create a custom image as per your needs using Adobe Illustrator and Import it to Android Studio as drawable and use it as placeholder using Glide
Code Example
Glide.with(fragment)
.load(url)
.error(R.drawable.placeholder)
.listener(new RequestListener<String, DrawableResource>() {
public boolean onException(Exception e, String model, Target<DrawableResource> target, boolean isFirstResource) {
// Hide ImageView and Display TextView
return false;
}
public boolean onResourceReady(DrawableResource resource, String model, Target<DrawableResource> target, boolean isFromMemoryCache, boolean isFirstResource) {
// Hide TextView and Display ImageView
return false;
}
})
.into(view);