0

I'm having some issues starting an activity in an Activity class that is called by a Fragment class (technically a PageAdapter inner class... the Android tab example is odd).

One of the tabs contains a list and I'd like to start a new activity when an item is clicked. I currently have a separate activity class which handles the list and interactions.

I've tried quite a few things such as getting the activity in the fragment and passing through the constructor. As well I have tried just about everything mentioned in this stackoverflow thread with no avail.

Currently in the PageAdapter (Non essential code omitted)

 public Object instantiateItem(ViewGroup container, int position) {
 .
 .
 View view;
 .
 case 1:
     view = getActivity().getLayoutInflater().inflate(R.layout.forum,
                            container, false);
     lva = new ListViewActivity(view);
     break;

This is to create a new a instance of the activity which will populate the view and listen for clicks. From this class I'd like to startActivity() with a new intent. Any thoughts would be much appreciated!

Community
  • 1
  • 1

0 Answers0