In this article we are going to see how change the alignment of screen of an Android device while performing Uni Testing using robotium framework.

After Initiating solo, we need to use the object of solo. I will make a separate post for getting started with robotium development.

-To make the screen as landscape alignment.
solo.setActivityOrientation(Solo.LANDSCAPE);
Note : solo.LANDSCAPE is an static integer value which is Zero(0). So, if we write like this, it will work. 
solo.setActivityOrientation(0);

-To make the screen as portrait
solo.setActivityOrientation(Solo.PORTRAIT);
Note : solo.PORTRAITis an static integer value which is One(1). So, same function
solo.setActivityOrientation(1);

Thanks...:)