If I have Arraylist<Integer> how can I do convert it to ArrayList<String>
final ArrayList<Integer> arrayList =
new ArrayList<Integer>(asList(19,85,955,9,2,62,96,2,6,26,2,26,2));
the Toast did not print any think on the Screen
ListView listView=findViewById(R.id.arraylistv);
final ArrayList<Integer> arrayList=new ArrayList<Integer>(asList(19,85,955,9,2,62,96,2,6,26,2,26,2));
final ArrayAdapter< Integer> arrayAdapter =new ArrayAdapter<Integer>(this , android.R.layout.simple_list_item_activated_1,arrayList);
listView.setAdapter(arrayAdapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(getApplicationContext(),"your num is "+arrayList,Toast.LENGTH_LONG);
}
});
ArrayList?Listwith values usingasList? Then you miss the static importjava.util.Arrays.