Q:

Fragment issue login

As I am working with a fragment I can not use the expression 
Intent mainLobby = new Intent (MainActivity.this, MainLobby.class);

I needed it to change activity after a login. How do I get around this problem?

A:

As last answer but i do this:
Intent mainLobby = new Intent (getActivity().getApplicationContext(), MainLobby.class);
startActivity(mainLobby);

**Edit
Normally when you make an intent you have to include the Context from you are doing it, so for that reason, if i were you i include the getActivity.getApplicationContext() in the first parameter, as you know the second parameter of intent is the class where you want to go.
Regards**

