使用API​​ 28反应本机元素beta7按钮borderRadius使backgroundColor透明

时间:2018-12-07 08:56:10

标签: javascript react-native react-native-android

在API 28上

react native elements beta7 use button use style borderRadius测试。 它使backgroundColor透明,但是可以在API 19上测试它。我不打算解决。请帮忙。

import React, {Component} from 'react';
import { View, ImageBackground, StyleSheet } from 'react-native';
import { images, imageStyles } from './component/Images';
import { styles } from './style/style';
import Text from './component/AppText';
import { Input, Button } from 'react-native-elements';

export default class Test extends Component {
  render() {
    return (
      <View style={styles.container}>
        <ImageBackground source={images.background} 
                         style={imageStyles.background}>
          <View style={{flex :8, 
                        justifyContent:'center', 
                        marginLeft: 30, 
                        marginRight: 30}}>
            <Button
                  buttonStyle={testStyles.LoginButton}
                  containerStyle={{
                    alignItems:"center",
                    marginTop: 30,  
                  }}
                  title= 'LOG IN'
                  onPress={() => console.log(11)}/>
          </View>
          <View style={{flex :2}}></View>
        </ImageBackground>
      </View>
    );
  }
}

const testStyles = StyleSheet.create({
  LoginButton: {
    backgroundColor: "black",
    borderRadius:15,
    borderColor: '#707070',
    borderWidth: 1,
    width:200,
    
  }
});

left is API28 and Right is API19

0 个答案:

没有答案