I have already checked the documentation. Perhaps I didn't make myself clear.
In my activity onCreate method: m_chkShowAll = (CheckBox)findViewById(R.id.chkShowAll); m_chkShowAll.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { CheckBox chkShowAll = (CheckBox)v; showAllCallback(chkShowAll); } }); m_chkShowAll.setChecked(m_blnSelectAll); The listener is not invoked when using setChecked, only when the user touches the checkbox. What I want is to invoke the listener when I set the state of the checkbox programmatically. For the time being I can call showAllCallback after setChecked, just wondered if they're is a better way to do it....and as far as I can tell from the documentation they're isn't. On Sun, Jul 17, 2011 at 6:11 PM, TreKing <treking...@gmail.com> wrote: > On Sun, Jul 17, 2011 at 11:32 AM, Simon Platten < > simonaplat...@googlemail.com> wrote: > >> I have a checkbox that has an onClick listener function attached, when my >> application starts up I read in the settings and set-up the initial state of >> the controls, is there anyway to get the views (in this case a checkbox) to >> invoke its onClick call-back when a value is assigned to it? > > > Hint: look at the CheckBox documentation. > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Regards, Sy -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en