且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

按钮在自动旋转的Android中相对布局重叠

更新时间:2023-11-21 11:30:10

然后你应该为相同的布局创建2个不同的文件,一个用于纵向布局,另一个用于横向布局。

所以现在,如果您有一个名为 temp.xml 的布局文件(用于纵向视图),请创建另一个文件并将其命名为 temp_land.xml



android框架将理解这两个文件之间的区别,并在每种模式下加载相应的文件。







-KR
Then you should create 2 different files for the same same layout, one is for Portrait layout, and another is for Landscape layout.
So right now, if you having a layout file named as temp.xml (for portrait view), create another file and name it as temp_land.xml.

The android framework will understand the difference between these two files, and load the appropriate file in each of the modes.



-KR