Image width depend on screen width in Native app

1
Hello, I am creating home menu for my native app. It is based on images, I have two images/buttons in a row and I want to make it looks the same on devices with different resolution. I know how to set fixed image's width, but I don’t know how making it responsive. What I want to achieve is to set width as a about 40-45% width of screen width. I read the documentation for styling native app, but I don’t know how to apply this : https://facebook.github.io/react-native/docs/height-and-width to created on my own class. Does anyone know how to solve this problem either using flex (as shown in link) or in other way?
asked
0 answers