The question of it is quite similar with Same DPI but different inch size. But it is in case of react native for android.
For example, I made a following element.
<View style={{width: 280, height: 300, backgroundColor: '#00B0F0'}}>
</View>
And I saw it in different device simulator, one is 320x480px, mdpi, 3.2inch
and another is 480x854px, mdpi, 5.4inch
.
And each device show it like below.
I think, since the used values for width
and height
are dp, the real size of the element is different for each devices, because of different inch size not dpi.
I am web developer and in some situations I faced to make app with react native. And the issue of setting dimension is very confused.
Do I use flex
? like developing responsive web ? or Is there other any other way or tips?
Thank you.