New Adapter not updating to the listview
<p>I'm trying to get selected items from main list, and updating them to other sub list, but when i click on main list item, all items of list will become invisible except the one i select, and only that element is updating to sub list, what might be the problem?... below code snippet shows what i'm doing....  </p>

<pre><code>ListView list,selectedList;
LazyAdapter adapter, adapter1;
String mStrings[]={"item1","item2","item3","item4","item5","item6","item7"};

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    list=(ListView)findViewById(R.id.list);
    adapter=new LazyAdapter(this, mStrings);
    list.setAdapter(adapter);
    list.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

    Button b=(Button)findViewById(R.id.button1);
    b.setOnClickListener(listener);

    list.setOnItemClickListener(new OnItemClickListener(){


        ArrayList&lt;String&gt; years = new ArrayList&lt;String&gt;();

        @Override
        public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
                long arg3) {

            SparseBooleanArray checked = list.getCheckedItemPositions();
                    if(checked.get(arg2))
                    {
                     years.add(mStrings[arg2]);                          
                    } 
                    else
                    {
                      years.remove(mStrings[arg2]);
                    }

             if(years.size()!=0)
             {
                 String selectedItems[]=new String[years.size()];
                 for(int i=0;i&lt;years.size();i++)
                     selectedItems[i]=years.get(i);

                 selectedList=(ListView)findViewById(R.id.selectedList);
                 adapter1=new LazyAdapter(MainActivity.this, selectedItems);
                 selectedList.setAdapter(adapter1);
                 adapter1.notifyDataSetChanged();
             }

             }});

}
</code></pre>
