Articles → Android → listview in android

listview in android






Purpose





Example





Click to Enlarge



String fruitlist[] = {"apple","banana","orange","cherry"};
ListView listView = (ListView) findViewById(R.id.lview);
ArrayAdapter<String> adapter =  new ArrayAdapter<String>(this,R.layout.support_simple_spinner_dropdown_item, fruitlist);
listView.setAdapter(adapter);



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, November 15, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250