解说修改图标和屏幕方向,程序名

Cocos2d-x 修改图标和屏幕方向,程序名

当做出一个游戏后,编译成apk安装在手机上,你会发现程序名和图标都是默认的,而放心默认是横屏,那么在哪里改呢?

打开工程->proj.android,找到AndroidManifest.xml并打开:

package="com.pianotiles.org"

android:versionCode="1"

android:versionName="1.0">

android:icon="@drawable/icon">

android:value="cocos2dcpp" />

android:label="@string/app_name"

android:screenOrientation="portrait"

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

扫描二维码关注公众号,回复: 11742628 查看本文章

android:configChanges="orientation">

android:smallScreens="true"

android:normalScreens="true"

android:largeScreens="true"

android:xlargeScreens="true"/>

先看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。

猜你喜欢

转载自blog.csdn.net/qq_21743659/article/details/108595983
今日推荐