0

when i hide keyboard with back key on android list is fully working and there is new items that i add. i want to refresh list without using back key to hide keyboard. my code is :

lv=(ListView) findViewById(R.id.listView1);
strArr=new ArrayList<String>();
adapter = new CustomListAdapter(getApplicationContext() , R.layout.custom_list , strArr);

lv.setAdapter(adapter);

while( ( line = br.readLine() ) != null ){
    strArr.add(line);
}

adapter.notifyDataSetChanged();
jww
  • 83,594
  • 69
  • 338
  • 732

1 Answers1

0

You are stuck in the loop until you click the back button. Try:

while( ( line = br.readLine() ) != null ){
   strArr.add(line);
   adapter.notifyDataSetChanged();
}