i tried to use the androidSVG (https://bigbadaboom.github.io/androidsvg/ ), Glide (https://github.com/bumptech/glide/tree/v3.6.0/samples/svg/src/main/java/com/bumptech/svgsample/app) libraries for displaying the flag of countries from this api : https://restcountries.eu/rest/v2/allfields=name;capital;population;flag;region but it didn't work !
StringRequest stringRequest = new StringRequest("https://restcountries.eu/data/ata.svg",new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
SVG svg = SVG.getFromString(response);
ImageView ig_countries_ = (ImageView) findViewById(R.id.ig1);
Glide.with(getApplicationContext()).load(svg).into(ig_countries_);
} catch (Exception e) {
e.printStackTrace();
}
}
},new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
RequestQueue queue = Volley.newRequestQueue(this);
stringRequest.setShouldCache(true);
queue.add(stringRequest);