Q:

R.layout Android 2.2.3

Why am i having to go all the way in my class so he can recognize this layout i created? Because it simply does not recognize as R.layout.my_layout
OK:
super(context, com.example.leonardoinhoqui.tcc2.R.layout.my_layout);

Problem:
super(context,R.layout.my_layout);

A:

Most probably you have a wrong import in your code (this sometimes happen when Android Studio resolves imports)
 import android.R.*;

and because of that you have to provide the full name of your own R package

