• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to know which button is click in previous Intent

restatement:

In my application, I have 6 independent view objects with on click handlers that each launch another activity via an intent (implicit or explicit). How can I know which view object initiated this intent?

Would that be a fair translation of your question?

If so, you can use putExtra() to bind data to the Intent call, which the receiving Activity can then unbundle from the call.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones