Commentary to modify the icon and screen orientation, program name

Cocos2d-x  modify icon and screen orientation, program name

When you make a game, compile it into an apk and install it on your mobile phone, you will find that the program name and icon are the defaults, and you can rest assured that the default is horizontal, so where do you change it?

Open the project->proj.android, find AndroidManifest.xml and open:

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"

android:configChanges="orientation">

android:smallScreens="true"

android:normalScreens="true"

android:largeScreens="true"

android:xlargeScreens="true"/>

First look at the application tag:

android:label: application name, @string/app_name means that the app_name label is defined in string.xml, you can find the string.xml file and modify it in the proj.android/res/values ​​directory.

android:icon: program icon, open proj.android/res and find three folders with the prefix of drawable, drawable-hdpi, drawable-mdpi, drawable-ldpi, the pictures stored in it correspond to high resolution, medium resolution and low resolution respectively Rate the picture.

Look at the activity tag:

android:name: The class name of the activity, which must be specified.

android:label: After defining this, it will override the android:label in the application.

android:screenOrientation: Don't worry about the screen. The default is landscape for horizontal screen and portrait for vertical screen.

Guess you like

Origin blog.csdn.net/qq_21743659/article/details/108595983