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?
--
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
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
On Sun, Jul 17, 2011 at 12:23 PM, Simon Platten
simonaplat...@googlemail.com wrote:
I have already checked the documentation.
http://developer.android.com/reference/android/widget/CompoundButton.html#setOnCheckedChangeListener(android.widget.CompoundButton.OnCheckedChangeListener)
17.07.2011 21:23, Simon Platten пишет:
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.
The listener will be invoked if the new state is different from
Thank you, I've tried it and it works:
m_chkShowAll = (CheckBox)findViewById(R.id.chkShowAll);
m_chkShowAll.setOnCheckedChangeListener(new
OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView,
6 matches
Mail list logo