-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnCLickListener ?? #6
Comments
Hi @lovingnirav , you can get the subitem view by calling the method You just have to do something like: final View view = item.getSubItemView(i);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// perform action
}
}); |
On line 41
How would you set different action for different subitem Example i want to start Activity1 on House click and Activity2 to open on Boat click Activity 3 to open on Candy click and so on.. |
On line 96 you may replace the code by: view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (subTitle.equals("House")) {
startActivity(new Intent(MainActivity.this, HouseActivity.class));
} else if (subTitle.equals("Boat")) {
startActivity(new Intent(MainActivity.this, BoatActivity.class));
}
...
}
}); |
Thanks it worked ....
|
How to add OnclickListener to subitem ?
The text was updated successfully, but these errors were encountered: