I'd like Layout to have the screen size horizontal. But when the screen turned, it would still be the same size. I made a small sketch of how I plan to stay:
Thecurrentxmlisjust:
<LinearLayoutandroid:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="16dp"></LinearLayout>
Edited
I ended up using even the acivity no create code:
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
int minimo=Math.min(dm.widthPixels,dm.heightPixels);
View layoutAlto = findViewById(R.id.login_layoutalto);
layoutAlto.getLayoutParams().width = minimo;
Thanks for the help