I have a relative layout that contains two fragments. My java code is designed to decide which fragment to choose based on the orientation of the screen. I want to have the app switch to a new activity when the screen is touched but I can't figure out how to code it up. I tried setting the main activity xml to be clickable and setting up the intent there but it's not working. I also tried allowing the fragment xml's to be clickable but I can't set an intent with the the fragment java file. My main activity looks like this if anyone can help. 

```
    public class StartPage extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        RelativeLayout useMe;

        FragmentManager fragmentManager = getFragmentManager();

        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

        Configuration configInfo = getResources().getConfiguration();

        if (configInfo.orientation == Configuration.ORIENTATION_LANDSCAPE) {

            StartPageLandscapeFragment startPageLandscapeFragment = new StartPageLandscapeFragment();

            fragmentTransaction.replace(android.R.id.content, startPageLandscapeFragment);

            useMe = (RelativeLayout) findViewById(R.id.startpage_landscape_layout);

        } else {

            StartPagePortraitFragment startPagePortraitFragment = new StartPagePortraitFragment();

            fragmentTransaction.replace(android.R.id.content, startPagePortraitFragment);

            useMe = (RelativeLayout) findViewById(R.id.startpage_portrait_layout);
        }

        fragmentTransaction.commit();

        useMe.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(StartPage.this, Question1.class);

                startActivity(intent);
            }
        });
    }

}

```