I want to change some views when the orientation changes for example i want to put text view from bottom of the screen to screen’s right side vertically when the orientation changes from portrait to landscape mode.How to achieve it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Create two distinct layouts with the same name (i.e. mylayout.xml), and put one in res/layout-port and the other in res/layout-land. If you call
in the onCreate() method of your activity, then Android will select the correct layout depending on whether the device is in portrait or landscape orientation.