我在这里有一个应用程序,我需要将徽标放在导航栏中.那需要溢出场景布局.在Ios中运行良好没有问题,但在android中似乎他不工作.我把代码放在图像的底部.如你所见,我使用EStyleSheet让我使用%.
IOS
Android的
import React from 'react';
import { Scene, Router } from 'react-native-router-flux';
import EStyleSheet from 'react-native-extended-stylesheet';
import { View, Platform } from 'react-native';
import { SmallLogo } from './components';
import { checkColor } from './helpers';
import {
HomeScreen,
ImagePickerScreen,
WaitingResponseScreen,
ResultsScreen
} from './modules';
import Colors from '../constants/Colors';
const styles = EStyleSheet.create({
navStyle: {
flex: 1,
marginTop: '5%',
alignItems: 'center',
},
logoCircle: {
backgroundColor: '$whiteColor',
height: 60,
width: 60,
borderRadius: 30,
justifyContent: 'center',
alignItems: 'center'
}
});
const …Run Code Online (Sandbox Code Playgroud) 在参考了这个文档可按下文档后,我正在使用可按下作为按钮
现在我想为按钮添加涟漪效果,但它无法正常工作。
<Pressable
android_ripple={{color: 'red', borderless: false}}
style={{backgroundColor: 'blue',borderRadius : 10}}>
<Text style={{alignSelf: 'center'}}>Button</Text>
</Pressable>
Run Code Online (Sandbox Code Playgroud)
如果按钮具有半径,则波纹效果没有边框半径。波纹效果角超出弯曲半径看起来很尴尬。
reactjs react-native react-native-android react-native-ios react-component