I want to implement one custom spinner for app where items will be countries name which will come from server. The name comes as ascending order which I want but I also want that India will come at first row of item.
// for country spinner
StringRequest sR = new StringRequest(Request.Method.GET, country_url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
ArrayList<String> arr = new ArrayList<String>(Arrays.asList(response.trim().split(",")));
arr.add(0, "Select Country");
ArrayAdapter<String> adapter = new ArrayAdapter<String>(EditDetails6.this, android.R.layout.simple_list_item_1, arr);
spinPCountryName.setAdapter(adapter);