leecade / leecade/react-native-swiper

Swiper shows grey background color on Android

Open
#954 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Which OS ?

Android OS

Version

Which versions are you using:
Android Oreo

  • react-native-swiper v?
    1.5.14
  • react-native v0.?.?
    0.59.1
Expected behaviour

I expected the background to have no color since backgroundColor is set to transparent

Actual behaviour

Background color is grey on Android and not on IOS

Code
 <Swiper  height={150} style={{backgroundColor:'transparent',marginBottom:20}}
                        onMomentumScrollEnd={(e, state, context) => console.log('index:', 
 state.index)}
                        dot={<View style={{backgroundColor: 'red', width: 7, height: 7, borderRadius: 
 5, marginLeft: 2, marginRight: 2, marginTop: 2, marginBottom: 2}} />}
                        activeDot={<View style={{backgroundColor: 'black', width: 7, height: 7, 
 borderRadius: 5, marginLeft: 2, marginRight: 2, marginTop: 2, marginBottom: 2}} />}
                        paginationStyle={{bottom: 120, left: null, right: 10}} loop={true}>
                          <Card>
              
                            <View style= {{height:140,width:"80%",borderRadius:10,backgroundColor:'white',flexDirection:'column'}}>
                                <View style={{flexDirection:'row',marginLeft:15}}>
                                  <FontAwesome name='mobile' style={{color:'black',margin:5}} size={15}/>  
                                  <Text style={{color:'black',fontSize:12,margin:5,fontWeight:'bold'}}> My Phone</Text>
                                </View>
                                <View style={{flexDirection:'row',marginLeft:15,marginBottom:5,marginTop:20}}>
                                  <Text style={{fontSize:30}}>50</Text><Text style={{fontSize:20,marginTop:10}}>GB</Text><Text style={{fontSize:14,marginTop:17,margin:5}}>left of 70 GB left bundle</Text>
                                </View>
                                <View style={{justifyContent:'center',marginLeft:20,marginRight:20,marginTop:0}}>
                                  <ProgressBar barStyle={{borderTopRightRadius:10,borderBottomRightRadius:10}} progress={0.5} height={10} width={sliderWidth} color='red' unfilledColor='grey' animated={false} style={{borderRadius:5}}/>
                                </View>
                            </View>
                        </Card > 
   <Swiper/>
Screenshot 2019-03-20 at 11 22 57 AM

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with react-native-swiper 1.5.14 on Android Oreo and React Native 0.59.1, using the provided Swiper example with a transparent background. Inspect the Swiper component's Android rendering and styling entry points; the issue is done when the background remains transparent on Android as it does on iOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.