Cocos2d-x 3.1 修改程序名、图标和屏幕方向
来源:互联网 发布:绿色access数据库 编辑:程序博客网 时间:2024/06/05 22:41
当做出一个游戏后,编译成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。
Cocos2d-x 3.1 修改程序名、图标和屏幕方向
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 设置屏幕默认方向
- android多分辨率多屏幕密度下UI适配方案
- MVC - Pass array from model to JS
- Genymotion最新下载地址2015-10-18
- Opencv+Kinect2.0抠图
- 【计算机视觉】借助图像直方图来检测特定物(MeanShift、CamShift算法)
- Cocos2d-x 3.1 修改程序名、图标和屏幕方向
- 八大排序算法
- C++ 多态性
- CocoaPods的安装和使用
- 权限管理:RBAC(基于角色的访问控制)SpringMVC实现
- Dijkstra-POJ-1062-昂贵的聘礼
- String 的普通构造函数、拷贝构造函数、析构函数、赋值函数
- 初学Java--计算器
- python实现简单爬虫功能