相关疑难解决方法(0)

隐藏在React-Native Android中的元素溢出

我在这里有一个应用程序,我需要将徽标放在导航栏中.那需要溢出场景布局.在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)

android reactjs react-native react-native-android

10
推荐指数
2
解决办法
2万
查看次数

角落处泄漏的涟漪效果,好像可按下按钮有一个 borderRadius

在参考了这个文档可按下文档后,我正在使用可按下作为按钮

现在我想为按钮添加涟漪效果,但它无法正常工作。

      <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

9
推荐指数
2
解决办法
3770
查看次数