i have a small query,
Suppose we start an activity using intents
startActivity(intent);
and a new screen opens up with content in it,like buttons and text fields
I just need to know if its possible to fetch the details about the layout and its contents.
I think its not possible, but just wanted to get a proper confirmation.
No, it’s not possible to do this. And (from comments) no, it’s not possible to “click” a button from a separate
Activity. What you can do, however, is this:You provide the
Intentthat starts theActivitywith an integer. This integer represents aView(more specifically, aButton). Once theActivityreceives it, it finds the matchingView, checks if its aButton, then performs a click action on it.This way, you’re just passing the integer ID of an item to click, and your opened
Activityjust handles the rest.