In my android application, I need to pass some data from an Activity class to a View class. But the problem is, I cannot call
protected void onActivityResult(int requestCode, int resultCode, Intent data)
method in View class. Is there another way to do this?
In your Extends View
Class
1) Declare variable
Bundle bundle=new Bundle();
2) Put This Method
public void setData(Bundle data)
{
bundle =data;
}
Access from Activity
View mView =new View(YourActivity.this);
mView.setData(new Bundle());
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments