hi ...
I am facing the simple problem with listview code.
I Override the OnCreate() like following:
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.xxxx);
setListAdapter(new ArrayAdapter<String> this , android.R.layout.simple_list_item_multiple_choice,listitems));
final ListView listView = getListView();
listView.setFocusable(false);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}
and its working fine..
I done some modifications on list (ie . removing few items from the list ) and i need to show the list(after modification) in the same screen as a listview.
I can able to get the list as a listview . by repeating the code like following
setListAdapter(new ArrayAdapter<String> this , android.R.layout.simple_list_item_multiple_choice,newlist));
final ListView listView = getListView();
listView.setFocusable(false);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
and its working fine ....(i got what i want )
but I dont want to repeat the setListAdapter() .....
is there any other way to do this ...
please help..

