Hi
I am trying to create an application in which I am implementing gallery
and checkbox.
Now my need is that whenever I click on either right or left arrow key,
image should be changed and simultaneously I want to change the state of
checkbox.
I tried to override onkeydown method but on right and left click images
are changing but state of checkbox is not changing.
Please help me.
Snippet of code is as follows-
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
if(check.isChecked())
{
check.setChecked(false);
check.invalidate();
}
break;
case KeyEvent.KEYCODE_DPAD_RIGHT:
if(check.isChecked())
{
check.setChecked(false);
check.invalidate();
}
break;
}
return super.onKeyDown(keyCode, event);
}
============================================================================================================================
Disclaimer:
This message and the information contained herein is proprietary and
confidential and subject to the Tech Mahindra policy statement, you may review
the policy at http://www.techmahindra.com/Disclaimer.html externally and
http://tim.techmahindra.com/Disclaimer.html internally within Tech Mahindra.
============================================================================================================================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---