View will lost background color when set borderRadius and height is large enough on Android device
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 127k
- Forks
- 25.3k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 4
Description
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
No
Environment
@mjmasn's environment:
Environment:
OS: Linux 4.13
Node: 8.11.0
Yarn: 1.7.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: N/A
Android Studio: 3.1 AI-173.4670197
Packages: (wanted => installed)
react: ^16.4.1 => 16.4.1
react-native: ^0.55.4 => 0.55.4
@beiming's environment:
Environment:
OS: macOS
Node: 7.7.1
npm: 4.1.2
Packages: (wanted => installed)
react-native: ^0.47.2 => 0.47.2
Target Platform:
Android
Android version: 4.4.4
Screen resolution: 720 x 1280
Steps to Reproduce
// index.android.js
import React, {Component} from 'react';
import {AppRegistry, View, Text, ScrollView} from 'react-native';
class App extends Component {
render() {
return (
<ScrollView>
<View style={{
// if `borderRadius` > 0 and `height` is large enough like 3000 (2000 is ok on my android device), `backgroundColor` will disappear.
borderRadius: 1,
height: 3000,
backgroundColor: 'red',
alignItems: 'center',
justifyContent: 'center'
}}>
<Text>Test</Text>
</View>
</ScrollView>
);
}
}
AppRegistry.registerComponent('App', () => App);
Run react-native run-android on a device, it does not reproduce on an AVD.
Expected Behavior
It will be show a long view, with red background, and scroll view show Test in center.
Actual Behavior
It will be show a long view, but no background color (white, maybe transparent), and scroll view show Test in center.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par la reproduction avec index.android.js et exécutez react-native run-android sur un appareil Android physique, puisque le problème ne se reproduit pas sur un AVD. Suivez le chemin de rendu de Android View pour une grande height, borderRadius et backgroundColor. Le travail est terminé lorsque l’arrière-plan rouge reste visible pendant le défilement sur l’appareil concerné et que la reproduction existante se comporte comme prévu.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- android, javascript, react-native
- Domaine
- mobile
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 38/100