简体   繁体   中英

How to BACK from second screen to first screen when device rotate 90 degree in android cardboard?

I am trying to develop an sample cardboard app in android. In that I am switching from First screen to Second screen, and i have done that successfully .

But when i am trying to BACK from second screen to first screen i don't know how to do that. I have gone through some of the links but didn't get success.

I want to go back to first screen from second screen when device get 90 degrees rotated as it is doing in most cardboard apps on play-store.

Can any one guide me how can I achieve this kind of functionality? Tutorials, links, explanations, anything?

Any help will be appreciated.

Actually, you don't need two screens , you need to update the layout when you rotate your screen .use two xml layout for the same activity. you need to handle screen change in onConfigurationChanged method.here is a full explanation on how to achieve it http://www.codeproject.com/Articles/422431/Handling-screen-layout-changes-in-Android

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM