In summary:
* You still provide multiple images but they are stored in the Files folder and are named "img_name", "img_name@2x", "img_name@3x"
* You load an image using LoadBitmap(File.DirAssets, "img_name") or LoadBitmapResize() - the appropriate resolution image is loaded as a bitmap object
In summary:
* You still provide multiple images but they are stored in the Files folder and are named "img_name", "img_name@2x", "img_name@3x"
* You load an image using LoadBitmap(File.DirAssets, "img_name") or LoadBitmapResize() - the appropriate resolution image is loaded as a bitmap object
*** B4i GUIDE
You should provide different icon files for the different screen scales.
File names for the different scales. myicon.png generic name myicon@2x.png file name for scale 2 images. myicon@3x.png file name for scale 3 images.
In an Initialize method you must use the generic file name. iOS selects automatically the correct file according to the device scale.
Example for a TabBar item. You must use only btnCH0.png and not btnCH0@2x.png nor btnCH0@3x.png.
*** B4i GUIDE
B4X:
'Define a button with custom bitmaps
Dim tbi As TabBarItem ' define a new TabBarItem
'define a custom TabBarItem with custom icons
tbi.Initialize("Countries", LoadBitmap(File.DirAssets, "btnCH0.png"), LoadBitmap(File.DirAssets, "btnCH1.png"))
it's quite clear for me.
So I can pick the "img_name", "img_name@2x", "img_name@3x" with the "Add Files" button of the Files manager tab instead of manually copying the images files (within a custom dir) like B4A (Object / res / drawable) ?
So I can pick the "img_name", "img_name@2x", "img_name@3x" with the "Add Files" button of the Files manager tab instead of manually copying the images files (within a custom dir) like B4A (Object / res / drawable) ?