React-native-linear-gradient: LinearGradient as background

Created on 26 Jun 2017  路  3Comments  路  Source: react-native-linear-gradient/react-native-linear-gradient

use linear-gradient as background, then i create a brother View which is absolute and can't see it even adjust zIndex

Most helpful comment

Just put components inside the LinearGradient as if it were a view.

<LinearGradient>
    <View>
    ...
    </View>
</LinearGradient>

All 3 comments

Just put components inside the LinearGradient as if it were a view.

<LinearGradient>
    <View>
    ...
    </View>
</LinearGradient>

How can i set a gradient color as a background color of the app ?

Was this page helpful?
0 / 5 - 0 ratings