Comments (9)
I tried a different approach instead of using react-native-blur library. I wrote a simple component with absolute positioning, black background, opacity tweaks and used it as backdrop.
Component :
import React,{Component} from 'react';
import {View,Dimensions} from 'react-native';
export default class BlurComponent extends Component {
render(){
width = Dimensions.get('window').width;
height = Dimensions.get('window').height;
return (
<View style={{position:'absolute',top:0,left:0,height:height,width:width,backgroundColor:'black',opacity:0.7}}></View>
)
}
}
and reference it in backdrop prop
<ActionButton backdrop={<BlurComponent />}>
I felt React Native Blur library was too much for this simple use case. Let me know if there are any issues with this approach.
from react-native-action-button.
@ranjithkumar8352 : You can try their default props bgColor .
<ActionButton buttonColor="red" bgColor="rgba(0,0,0,.4)" >
<ActionButton.Item buttonColor='#fff' title="Add Property" >
<Icon name="md-beer" style={styles.actionButtonIcon} />
</ActionButton.Item>
</ActionButton>
from react-native-action-button.
Hey, did you try to give the ActionButton component a prop like this:
<ActionButton backdrop={<VibrancyView blurType="light" style={styles.blur} />}> ...
styles.blur needs to have the width and height of the device in order to blur the background.
from react-native-action-button.
Hey,
thanks for that fast Tipp. Now i do not get any Message, BUT instead of having the blurred look, i only see a red border around my complete screen, when clicking the ActionButton.
Any Idea, how that might come.
from react-native-action-button.
Nevermind I have the Solution :) THANKS SUPER GREAT ANSWER 👍
from react-native-action-button.
@alexanderniebuhr Can you share your solution please? :) I am getting the same red border...
from react-native-action-button.
I think he forgot to link the library (react-native-blur) to his project, if I remember correctly
from react-native-action-button.
For some reason I am still getting Native component for "VibrancyView" does not exist
after using rnpm link
, but I ll look into it.
Thanks very much!
from react-native-action-button.
Thanks @Sonukr I think this prop was added recently
from react-native-action-button.
Related Issues (20)
- how to style the button shadow
- Enable scroll on Action Button Items HOT 1
- ActionButton Item click event not working HOT 1
- active opacity does not change
- How to change position a little bit up from default.? HOT 1
- Transparent Background color for ActionButton.Item HOT 1
- Please publish current 2.9.0 version to npmjs.com HOT 2
- Documentation needs to be updated
- Problem with componentWillReceiveProps and ActionButton HOT 4
- Cannot read property 'props' of null HOT 2
- You may need an appropriate loader to handle this file type, currently no loader s are configured to process this fil
- How to place action button above react-navigation tab bar HOT 1
- Centered action button item labels shown on left
- componentWillReceiveProps throws warning HOT 1
- Crashes React Native 0.69.x HOT 6
- Is the library still maintained? HOT 3
- Issues on Android 13? HOT 1
- Invariant Violation: ViewPropTypes has been removed from React Native HOT 1
- onReset property does not exist
- componentWillReceiveProps has been renamed + useNativeDriver HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-action-button.