Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个搜索栏适用于 ios 和 android 。这是我正在使用的搜索栏的链接。 https://github.com/localz/react-native-searchbar 虽然它不是针对 android 而是针对 ios 显示的。
阅读他们的文档后
安卓笔记
在应该显示的组件之后渲染搜索栏组件。iOS 使用 10 的 zIndex 很好地处理了这个问题。Android 高度设置为 2。搜索栏的底部将有一个细边框而不是阴影。
我只是使用了他们的示例,只在顶部添加了一行
import React, {Component} from 'react';
它工作正常