react-native-admob
react-native-admob copied to clipboard
How to put center?
I put code.
<AdMobBanner
adSize="fullBanner"
adUnitID="ca-app-pub-00000/0000000"
/>
but, it is not center.
So, I wrote parent View
tag.
<View style={styles.banner}>
<AdMobBanner
adSize="fullBanner"
adUnitID="ca-app-pub-00000/0000000"
/>
</View>
and style sheet.
const styles = StyleSheet.create({
banner: {
justifyContent: 'center',
}
});
never changed.
With me this problem also happens. Has anyone found a solution?
With me this problem also happens. Has anyone found a solution?
use alignItems too, try this styles:
banner: { justifyContent: "center", alignItems: "center" }
I added style for parentview. It's working style={{width:'100%', position:'absolute', justifyContent: "center", alignItems: "center"}}
Hello , Im also having the same problem . I also tried the solutions above , not working for me . How did it work for you guys ?
"react-native-google-mobile-ads": "^7.0.1", "react-native": "0.66.3",