How to make curved header view in React Native?

谁都会走 提交于 2020-06-23 13:37:11

问题


Why some people make it duplicate? I I said that was my question...

First, I own this question and now I want to show a better example of my question. Honestly, I didn't try the answer yet because I'm curious is there anyway to solved this by code? Well, is it even possible? Besides, using an image as a background to solve this would be a problem, no? I mean, the user's phone is not always has the same screen size.

Here's an example of the idle state of my home screen. I got header with search bar and an horizontal scrollview of image banner. As you can see, if you notice, the banner is overlapping on the top of blue square and a curved blue view.

And what happen is user scrolled down? Here:

The curved view and banner is scrolled up. So, how do I achieve this? Thank you


回答1:


You can create a png file, with transparent background and this curved border. Then, set this file as ImageBackground of your header.



来源:https://stackoverflow.com/questions/60219563/how-to-make-curved-header-view-in-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!