If I understood your problem correctly, here is what you can do: create an empty Activity
(without setting its content) like this:
public class EmptyActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Your screen orientation logic here
}
}
and then you make all other Activities
extend the EmptyActivity
. So, you just need to implement your screen orientation logic once.