我找到了this但我不清楚的是; 当有很多带有 fragment 的布局时,如何添加
/res/layout/layout.xml // Default layout
/res/layout-small/layout.xml // Small screens
/res/layout-large/layout.xml // Large screens
/res/layout-xlarge/layout.xml // Ex
/res/layout-small-land/layout.xml // Small screens, landscape view
/res/layout-small-portrait/layout.xml // Small screens, portrait view
要使应用程序兼容任何屏幕尺寸?另外,对于一个 UI 来说,是否需要设计所需 View x6(布局、小、大、超大、小陆地、小肖像) 倍的屏幕尺寸?
最佳答案
You can check this :
res/layout/main_activity.xml # For handsets
res/layout-land/main_activity.xml # For handsets in landscape
res/layout-sw600dp/main_activity.xml # For 7” tablets
res/layout-sw600dp-land/main_activity.xml # For 7” tablets in landscape
关于java - 支持多种布局的屏幕 list ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58152184/