Code example for Address

Methods: getAddressLine, getCountryName

0
    @Override 
    public String getItem(int position) {
        try { 
            Address address = addressList.get(position);
 
            String text = address.getAddressLine(0);
 
            if (address.getCountryName() != null)
                text = text + " (" + address.getCountryName() + ")";
 
            return text;
        } catch (Exception exception) {
            return null; 
        } 
    } 
 
    @Override 
    public long getItemId(int position) {
        return position;
    } 
}