最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - React Native Text Input Handle Xiaomi weird shape - Stack Overflow

programmeradmin4浏览0评论

I have a problem with the shape of the TextInput handle on my Xiaomi Redmi Note 8 Pro, these are an image and a code example:

<TextInput
          style={{
            backgroundColor: Colors.dark.backgroundLight,
            color: Colors.dark.text,
            height: 40,
            flex: 1,
            paddingHorizontal: 16,
            borderRadius: 20
          }}
          placeholder="Cerca"
          placeholderTextColor={Colors.dark.textLight}
          cursorColor={Colors.dark.tint}
          selectionColor={Colors.dark.tint}
          selectionHandleColor={Colors.dark.tint}
        />

After some testing the problems seem to be “selectionColor” and “selectionHandleColor” (if I use at least one of these two properties the cursor shape changes as in the image), it should be like so:

I encountered this problem in Expo RN 51 and in Expo RN 52, and I think the problem may be the way MIUI handles these things.

I've tried not using these two properties and it works fine (cursor color also works without problems), it seems that styling is not a problem (I've tried removing most of it and the problem remains).

发布评论

评论列表(0)

  1. 暂无评论