I have a question about resize layout. This is my activity:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
requestWindowFeature(Window.FEATURE_ACTION_BAR);
setContentView(R.layout.log_in);
}
How can I set size my R.layout.log_in in this activity? I want set size to 400×300 but in activity not xml.
I don’t know what are your requirements but I prefer to set the dimension on the xml (if they’re suppose to be fixed).
Anyway, this can be useful.
The code used in the link: