Easy to learn ionic (d) Modify app icon and splash screen

Source: Internet
Author: User

app icon:

1. Create the Res folder under the entire project folder, and create two folders, Android and iOS, respectively.



2. For Android platform: Place our boot icon to be replaced under the Android folder. They can be named: Mdpi.png (48*48),hdpi (72*72), xhdpi (96*96), xxhdpi (144*144), and Xxxhdpii (192*192). for iOS, you want to add.
3. Add the
 <platform name=" Android ">
              <icon src= "res/android/ldpi.png" density= "ldpi"/>
              <icon src=" Res/android/mdpi.png "density= "MDPI"/>
              <icon src= "res/ Android/hdpi.png "density=" hdpi "/>
            & nbsp <icon src= "Res/android/xhdpi.png" density= "xhdpi"/>
</platform>

Where the picture path in SRC is the relative path to the entire project.
Here, by the way, if you want to modify the name of the app, just modify the contents of the name tag.
Then rerun Ionic run Android on the command line to see that the app icon and name have been replaced.

Start Screen:
 Copy the splash screen image to the previous Android folder,splash-land-hdpi.png (640*480) splash-land-ldpi.png (426x320 ) splash-land-mdpi.png (470x320) splash-land-xhdpi.png (960x720) splash-port-hdpi.png (480*640) splash-port-ldpi.png (320*426) splash-port-mdpi.png (320*470) splash-port-xhdpi.png (720*960)
(The name can be arbitrary, as long as it corresponds to CONFIG.
    Add in CONFIG.
<splash src= "Res/screen/android/splash-land-hdpi.png" density= "land-hdpi"/>
<splash src= "Res/screen/android/splash-land-ldpi.png" density= "land-ldpi"/>
<splash src= "Res/screen/android/splash-land-mdpi.png" density= "land-mdpi"/>
<splash src= "Res/screen/android/splash-land-xhdpi.png" density= "land-xhdpi"/>

<splash src= "Res/screen/android/splash-port-hdpi.png" density= "port-hdpi"/>
<splash src= "Res/screen/android/splash-port-ldpi.png" density= "port-ldpi"/>
<splash src= "Res/screen/android/splash-port-mdpi.png" density= "port-mdpi"/>
<splash src= "Res/screen/android/splash-port-xhdpi.png" density= "port-xhdpi"/>
    <preference name= "SplashScreen" value= "screen"/>
    <preference name= "Splashscreendelay" value= "10000"/>
10000 units in milliseconds, that is, after 10 seconds to hide the splash screen. If you do not write the third sentence, the default is 3 seconds hidden.
   As shown in the following:


I do not have so many resolutions in the picture, just looking for a slightly larger resolution, density did not write. It will automatically copy the picture to the Drawable folder.
Then run the program again to see the splash screen.
With the above method, the Start screen display length is fixed, it is obviously not very friendly.
Not finish ...

Easy to learn ionic (d) Modify app icon and splash screen

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.