How can I put an icon inside a TextInput in React Native?

前端 未结 9 2127
轻奢々
轻奢々 2020-12-04 19:03

I am thinking of having something like this https://android-arsenal.com/details/1/3941 where you have icon that you press to show password as plaintext, not as dots. However

9条回答
  •  误落风尘
    2020-12-04 19:28

    This is working for me in ReactNative 0.60.4

    View

    
        
    
        
    
    

    Styles

    SectionStyle: {
        flexDirection: 'row',
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#fff',
        borderWidth: 0.5,
        borderColor: '#000',
        height: 40,
        borderRadius: 5,
        margin: 10,
    },
    ImageStyle: {
        padding: 10,
        margin: 5,
        height: 25,
        width: 25,
        resizeMode: 'stretch',
        alignItems: 'center',
    }
    

提交回复
热议问题