简体   繁体   中英

One Activity two different Layouts with own theme?

Is it possible in Android to have a Activity with two Layouts and each of the layouts has his own theme?

Activity

  • Layout landscape with android:theme="@style/MyTheme1"
  • Layout Portraie with android:theme="@style/MyTheme2"

You can achieve this by using Folders /res/layout-land for landscape layouts and /res/layout-port for portrait.

The same you can do with styles if you want, just put them into /res/values-land /res/values-port

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