All Things Techie With Huge, Unstructured, Intuitive Leaps
Showing posts with label call activity from fragment. Show all posts
Showing posts with label call activity from fragment. Show all posts

Android Development Call A New Activity From ItemDetailFragment

I had to quickly look this up, so others might too.  How do you call a new activity from a fragment or the ItemDetailFragment?  Get the parent.  Like this:

Intent myIntent = new Intent(getActivity(), NameYourClass.class);
getActivity().startActivity(myIntent);
getActivity().startActivity(myIntent);



Hope this helps someone.