My main thought on glancing at this is: you are more likely to get the help you want if you tell us more. What, for example, do you expect NotifyDataSetChanged() to do? What data has changed, and what View are you expecting needs to be updated to reflect the change?
Maybe you will luck out and find a reader more willing to do "code diving", but I am not in the mood to reverse-engineer your code to figure out the answers to these questions tonight myself. On Jun 4, 7:58 pm, Ramesh Sangili <[email protected]> wrote: > Any help is greatly appreciated!!! > > Please guys share your thougths > > On Sun, May 30, 2010 at 8:01 AM, Ramesh Sangili > <[email protected]>wrote:> Guys, > > > I am extending BaseAdapter and trying to populate the List Screen on my > > Activity Screen. NotifyDataSetChanged is not working as expected. Please > > find the below snippet of code. Please do let me know your thoughts. > > > public void onCreate(Bundle savedInstanceState) { > > > super.onCreate(savedInstanceState); > > initialize(); > > context = this; > > config = Config.getInstance(); > > searchText = new EditText(this); > > handler = new Handler() { > > �...@override > > public void handleMessage(Message msg) { > > msgQueueAdapter.notifyDataSetChanged(); > > context.msgQueueAdapter.notifyDataSetChanged(); > > msgQueueAdapter.notifyDataSetInvalidated(); > > } > > }; > > searchText.addTextChangedListener( new TextWatcher() { > > �...@override > > public void onTextChanged(CharSequence s, int start, int before, int > > count) { > > // TODO Auto-generated method stub > > Log.d("on text", "String: " + s); > > loadData(s.toString()); > > msgQueueAdapter = new ListAdapter(context, msgQueueList); > > Message msg = handler.obtainMessage(); > > handler.sendMessage(msg); > > searchText.bringToFront(); > > runOnUiThread(new Runnable() { > > �...@override > > public void run() { > > msgQueueAdapter.notifyDataSetChanged(); > > searchText.setCursorVisible(true); > > searchText.setClickable(true); > > } > > }); > > } > > �...@override > > public void beforeTextChanged(CharSequence s, int start, int count, > > int after) { > > } > > �...@override > > public void afterTextChanged(Editable s) { > > // TODO Auto-generated method stub > > } > > }); > > msgQueueAdapter = new ListAdapter(this, msgQueueList); > > Log.d("list", "List Display - 1" + msgQueueAdapter); > > msgQueueListView = this.getListView(); > > msgQueueListView.addHeaderView(searchText); > > setListAdapter(msgQueueAdapter); > > msgQueueAdapter.notifyDataSetChanged(); > > this.msgQueueAdapter.notifyDataSetInvalidated(); > > } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

