I am trying to make a RelativeLayout in Java.
The problem is that I can not find a value that makes my code fit with a vertical layout:
//Build version is just to avoid the deprecated setOrientation
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
relative.setRotation(HORIZONTAL);
}
else {
relative.setOrientation(HORIZONTAL);
}
It works for HORIZONTAL, but not for VERTICAL. I have tried PORTRAIT and VERTICAL and Eclipse does not give me any response (no correcting or quick fixes) to solve this problem.
Does anyone know what would work for a horizontal rotation?
A
RelativeLayoutlayout does not have orientation. That is, all the components in the layout are relative to other components.The
LinearLayoutis the guy who can be set HORIZONTAL or VERTICAL