AndroidManifest.xml文件中,
screenOrientation="landscape" 为横屏, screenOrientation="portrait"为竖屏
二、读写sd卡
AndroidManifest.xml文件中,先增加权限:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
FILE *fp = fopen("/mnt/sdcard/xxx.xxx", "rb+");
此时就可以了,切记根目录前缀:
/mnt/sdcard/ 指代sd卡的根目录