Android Question Adaptive Icon and CreateResource directory

Robert Valentino

Well-Known Member
Licensed User
In this post by Erel: https://www.b4x.com/android/forum/threads/adaptive-icons.95244/#content

He explains how to setup adaptive icons.

in the manifest create statement:
B4X:
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@mipmap/background"/>
    <foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)

It initially wasn't working for me.

He uses mipmap-anydpi-v26 as a directory. Now I (very bad on my part) blindly copied the code and it was not working for me because I was using SDK 27. Once I changed the statement to mipmap-anydpi-v27 everything started working.

DO I need to always update my directory based on what version of the SDK I am using? OR can I use ANY directory statement in the CreateResource?
 
Top