As explained here the react native packager works well for images with retina suffix (#2x and #3x) and platform specific suffix (.android.png, .ios.png etc.) when used individually but it fails to serve retina images when both are used at once. I tried mixing them both ways both image#2x.android.png and image.android#2x.png but only 1x image is loaded on all devices regardless of device's pixel density. I'm importing image like import image from './images/image.png'. I tried searching for this on Google and in the react-native issues but couldn't find any helpful info.
Is it a bug or I'm doing something wrong? If it's a bug then is there a workaround? If I'm doing something wrong then what's is it? I do not want the ios specific images to be bundled in android and vice-versa.
Related
I made a simple app to convert units using Expo.
However, the icon is zoomed in once installed.
It was supposed to be like this
This is a 1024x1024 image.
The source code of my app is here -> https://github.com/Elson0509/peuc
The app in the Google Play Store is here -> https://play.google.com/store/apps/details?id=com.elsonramos.peuc
Someone can help me?
Thank you
The latest Android versions support adaptive icons which scaled well for different icon layouts - Square, Round, Circle, and more.
Expo Team provide a template to design adaptive icon
https://www.figma.com/community/file/1155362909441341285
New link for the Expo Team template: https://www.figma.com/community/file/1155362909441341285
The screen resolution of the phone is 1920x1080, the screen resolution in the application is 640x360. How to fix it? Or should it be? The application is launched through Expo.
There are lots of devices that have unique resolution. Usually i pick some number of the most popular devices and check my app there.
You should write flexible code that will look great on most part of devices. Use flexbox and adaptive design my friend!
Dimensions in React Native are measured in density-independent pixels (dp) rather than pixels (px). This allows the user to see it at the same size regardless of the device resolution. So, while your phone is 1920x1080 in px, it is 640x360 in dp.
I'm wondering how to change an expo app's configurations. Examples of what I mean by configurations:
Make the app only available for tablets, require location/wi-fi connection/bluetooth connection, specify multiple icon sizes, etc ...
I'm asking this because I generated an ipa, tried to build it with Application Loader but I got this error:
Missing required icon file. The bundle does not contain an app for
iPhone / iPod Touch of exactly '120x120' pixels, in .png format for
iOS versions >= 7.0
Does this have anything to do with exp.json ?
Thanks!
Set application icon in this pixel
Most likely your watchKit app icons are not of the correct size. You need follow the instructions in above image
Resizing the Icon to have square values (width = height) did the trick. The icon has to be a square.
See https://github.com/expo/expo/issues/278#issuecomment-309078847
[MEMORY ISSUE ON ANDROID]
hi all,
We're developing the application called Pippip at pippip.vn . It works very well on iOS but it has the problem on Android, it's out of memory when we load more large images, does anyone know how to fix it? Thanks all
We had similar issues, fix here. Before rendering the full image, we compressed the photo based on the screen size to discard information that is not visible on the screen (resolution wise).
We can place iOS specific app icon and launch image in Asset Catalog. Can we place other images used for buttons, bars or other UI elements in the Asset Catalog to be used with specific iOS versions? Or there is only way to do these programmatically?
I have the same problem. It would have been really nice, if Apple had developed a more flexible asset management, like Android (for example) has since many years...
Regarding your question: According to the official documentation, there is no such way (at least I could not read anything about it) at the moment (iOS 7).