Cocos2d-x 3.1 修改程序名、图标和屏幕方向
来源:互联网 发布:mysql存储过程怎么用 编辑:程序博客网 时间:2024/06/06 16:36
当做出一个游戏后,编译成apk安装在手机上,你会发现程序名和图标都是默认的,而放心默认是横屏,那么在哪里改呢?
打开工程->proj.android,找到AndroidManifest.xml并打开:
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pianotiles.org" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="9"/> <uses-feature android:glEsVersion="0x00020000" /> <application android:label="@string/app_name" android:icon="@drawable/icon"> <!-- Tell Cocos2dxActivity the name of our .so --> <meta-data android:name="android.app.lib_name" android:value="cocos2dcpp" /> <activity android:name="org.cocos2dx.cpp.AppActivity" android:label="@string/app_name" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:configChanges="orientation"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true"/> <uses-permission android:name="android.permission.INTERNET"/></manifest>
先看application标签:
android:label:应用程序名字,@string/app_name说明在string.xml定义了app_name标签,可以到proj.android/res/values目录下查找string.xml文件并修改。
android:icon:程序图标,打开proj.android/res发现有三个drawable前缀的文件夹,drawable-hdpi、drawable-mdpi、drawable-ldpi,里面存放的图片分别对应高分辨率、中分辨率和低分辨率的图片。
再看activity标签:
android:name:activity的类名,必须指定。
android:label:定义这个之后,就会覆盖application中的android:label。
android:screenOrientation:屏幕放心,默认是横屏landscape,竖屏是portrait。
0 0
- Cocos2d-x 3.1 修改程序名、图标和屏幕方向
- Cocos2d-x 3.1 修改程序名、图标和屏幕方向
- Cocos2d-x 3.0 Android修改APK名、更改图标、修改屏幕方向、修改版本号,一些需要注意的问题
- Cocos2d-x 3.0 Android修改APK名、更改图标、修改屏幕方向、修改版本号,一些需要注意的问题
- cocos2d-x程序移植android时修改屏幕显示方向
- Cocos2d-x Android修改ICON名字、更改图标、修改屏幕方向、修改版本号
- cocos2d-x 修改安卓屏幕方向
- cocos2d-x 获取屏幕当前方向和系统语言
- cocos2d-x 获取屏幕当前方向和系统语言
- cocos2d-x 2.x 支持多个方向屏幕翻转
- quick-cocos2d-x 如何设置游戏的屏幕方向
- Cocos2d-x中移植到Android真机上屏幕方向设置
- quick-cocos2d-x 如何设置游戏的屏幕方向
- Cocos2d-x添加Android重力感应切换屏幕方向
- cocos2d-x-3.x 修改和纪录
- 更改Android程序名和启动图标
- cocos2d 设置屏幕默认方向
- cocos2d 设置屏幕默认方向
- Goldjengate-如何查看OGG进程已无延迟
- 安卓错误总结
- [UvaLive 6756] Increasing Shortest Path [动态规划]
- android mkdirs()不能创建目录
- java编程题经典中的经典
- Cocos2d-x 3.1 修改程序名、图标和屏幕方向
- 使用struts2和poi导出excel文档
- 给年轻的工程师---关于高工资
- ZOJ-1203
- JavaScript中获取当前项目的绝对路径
- 国家气象局提供的天气预报接口(完整Json接口)
- 数据结构_求二叉树的高度以及层次遍历二叉树算法_C语言源代码
- dagger注入在eclipse下的配置。
- LeetCode——Remove Nth Node From End of List