Image Loading With DataBinding in Android

We have already seen DataBinding Basics and setting fonts through DataBinding in previous tutorials. Today we will take a look at Image loading with databinding .
Step 1 : Define POJO/Model class
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
public class PersonModelClass { String name,designation,image_url; public PersonModelClass(String name, String designation, String image_url) { this.name = name; this.designation = designation; this.image_url = image_url; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDesignation() { return designation; } public void setDesignation(String designation) { this.designation = designation; } public String getImage_url() { return image_url; } public void setImage_url(String image_url) { this.image_url = image_url; } } |