Git Product home page Git Product logo

react-native-action-button's People

Contributors

adamivancza avatar cnjon avatar d-moreira avatar danieldunderfelt avatar deduckproject avatar djibouti33 avatar ehesp avatar felipecarreramo avatar funkyeah avatar iris-chang avatar jakewtaylor avatar jankalfus avatar jschloer avatar jsdario avatar lukefanning avatar mastermoo avatar mehcode avatar mirza-s avatar mmazzarolo avatar nvladimiroff avatar paularonofsky avatar paulomenezes avatar rusel1989 avatar sarriaroman avatar sibelius avatar slycoder avatar styd avatar sudoplz avatar x13945 avatar yusmarcastro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-action-button's Issues

Buttons vanishing

For some reason the action buttons in my app have started disappearing shortly after the action button is pressed. I suspect, (but have no proof) it might be when my component is re-rendering as a result of some props/state changes. Perhaps the action button is losing its open/close state between renders?

[IOS] RN 0.27 Can't use whole view with Action Button on it

Hey,

I have the Action Button for a while now. It started well and everything works fine. But since the last update I have an weird Problem. The Action Button Component seems to be over the whole View. As I try to Touch my Buttons I can't reach them. So I started the Inspector and clicked on an Button an whups there I got the ActionButton backdrop for the whole screen. As I deleted the Button out of my project everything works again fine.

PLS fix asap.

Cheers
Alex

Very Poor performance

Tapping the FAB to show more buttons is extremely sluggish, looks like ~15fps. An setting I may be missing?

Even the active state after taping is about 2 seconds delayed.

Ran the example on a Nexus 6p

    "react": "15.2.1",
    "react-native": "0.30.0",
    "react-native-action-button": "^1.1.11",
    "react-native-vector-icons": "^2.0.3"

Default button +

Hi
Your action button's first item must be plus sign(+), is there possible customize this with an Icon component.

Warning: Failed propType: Invalid prop name of value android-create supplied to Icon

It's throwing that warning and not showing the Icons, it only works with the default one

import Icon from 'react-native-vector-icons/Ionicons';
import ActionButton from 'react-native-action-button';
{...}
<View style={{position: 'absolute', left:320, top: 310, width: 90, height: 300}}>
    <ActionButton buttonColor="rgba(231,76,60,1)" style={{position: 'absolute'}}
           icon={<Icon name="quote-right" color="#fff" size={20}/>} />
</View>

Also tried with FontAwesome and it showed a broken symbol, could you explain exactly how to show the Icons in Android? Because the example, exactly as shown, isn't working.

Edit: Looks like you have to manually install the fonts, maybe add that in the README.md? :)

Material Design dropshadow

Not sure if this is possible yet in RN, but it would be nice to have the Material Design style drop shadow on the button

Button shadow gets cropped on left and right

The elevation is a great addition to the button, however the shadow gets cropped left and right. From the Basic example has right cropped shadow:

screenshot_20160825-120016

Other project also has left crop:

bad

Expected:

good

I'll try and create a fix.

silly question , push new view

hi ,
i can't figure out how to push a new view on android,
i'm not using a navigator,
i tried to add a method call to the onPress,
and in the method i have a return(<text....) but nothing happen ,
any example ?
thanks

Breaks Android ScrollView

I've attempted to put a floating action button over an AndroidScrollView, but now the view doesn't scroll. Any works-arounds for this?

ActionButtonItem must have a Child component.

This is a great component!!

If I create ActionButton items from a "map" iteration, this error appears.

My code:

<ActionButton buttonColor="rgba(231,76,60,0.7)">

            {this.state.categories.map((item, index) => (

              <ActionButton.Item buttonColor='#87c776' key={index} title={item.title}
                                 onPress={this._gotoPage.bind(this, item)} >
                  <Icon
                    name='fontawesome|dot-circle-o'
                    size={18}
                    color='#fff'
                    style={{width: 18, height: 18}}
                  />
              </ActionButton.Item>

            ))}

            <ActionButton.Item buttonColor='#3498db' title='Ver favoritos'
                               onPress={this._onPressFavoritos.bind(this)} >
                <Icon
                  name='fontawesome|star'
                  size={18}
                  color='#fff'
                  style={{width: 18, height: 18}}
                />
         </ActionButton.Item>
 </ActionButton>

this.state.categories has 3 items.
If I remove the "map" block it all goes well.

How to add Backdrop - Example code?

Hello together,

I tried many different ways to add a Backdrop to the RN Action Button. But I got some Problems with the Type "Object" etc.

Could someone help me with some Example Code for a blurred Backdrop?

Thanks and regards
Alex

Each child should have unique key prop warning

Hey, first of all great component! Thanks a lot!

So the warning I get from when the action buttons are active is "Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of ActionButton." I see you added a key attribute to fix this warning. But I dont think its been published to npm with this update.

Can't update action button item title with setState

Action button code:

    <ActionButton.Item buttonColor='#3498db' title={this.state.favText} onPress={() => { this.checkFavourite(currentRoute.id) }}>
        <Icon name='ion|android-star-outline' size={20} style={styles.actionButtonIcon} />

Logic:

    checkFavourite = (id) => {
        if (this.state.favText == "Add to Favourites") {
            this.setState({
                favText: "Remove from Favourites"
            });
            console.log(this.state.favText);
        } else {
            this.setState({
                favText: "Add to Favourites"
            });
            console.log(this.state.favText);
        }
    }

I tried this logic on a simple component, and it works.

<Text>{this.state.favText}</Text>

Any ideas?

Positioning but how?

How can I move the button to the x=200, y= 300 of the screen. offsetX and offsetY don't seem to be working the way I want them.

I'm on react-native 0.24.0

Must have a child component when wrapping ActionButton.Item

Im trying to create a ActionButton.Item component separately from the ActionButton wrapper

export default
class NewMessageActionItem extends React.Component {
    render() {
        return (
          <ActionButton.Item buttonColor="blue" title="Send Message" onPress={() => console.log("notes tapped!")}>
            <Icon name="comment-o" style={style.actionButtonIcon} />
          </ActionButton.Item>
        );
    }
}

and separately I have

class UserActions extends React.Component {
    render() {
        return (
          <ActionButton buttonColor='green'>
            <NewMessageActionItem />
          </ActionButton>
        );
    }
}

It throws an error when the Action is tapped that ActionButtonItem must have a Child component.

Is the above possible? Am I missing something..

Shadow warning with RN0.21

"View #1063 of type RCTView has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this, or apply the shadow to a more specific component."

Thanks!

Button position is wrong after being clicked

The action button shifts down after being clicked. It's not by a huge amount, but it's pretty noticeable when you're clicking it.

before
after

It's also completely off in landscape view if you switch to landscape after starting the app.

before_landscape
after_landscape

Button not rotating anymore

button is not rotating anymore when clicked since last npm install (yesterday). I've set the degrees prop at 360 but nothing happens. anyone else having this issue?

Clicking outside of action buttons area

I've used reveal to show the layout of the buttons and the way that they spread on the screen
As you can see there is a whole view surrounding the ActionButton.Items starting right above the ActionButton itself and spreading all the way to the top.
If you click this area then the reset method would get called and the cool animation of closing the buttons would get called.
However, once they are opened if you click to the left of the action button the the click would propagate down to any actionable item below the backdrop -L leading to unwanted results such as buttons being clicked when they shouldn't=> how can we solve this?

image

Props changes not taking effect

I'm trying to dynamically change some features of the action button, such as change its position on screen or change its background color.

The changes don't seem to have any effect. I've con logged the state in the render method and I can see that they have the correct values, but the component doesn't seem to redraw itself. Have i missed something?

change active state

when setting active as true or false it works fine.
but when true or false stored in the state it doesn't render the buttons state.
for example:
when i have no posts i want it ti be open and when i have posts i want it ti be close.
it works only when the page render at the first time.

require failed

do as
var ActionButton = require('react-native-action-button'),
Icon = require('react-native-vector-icons/Ionicons');
compile passed
but always got the runtime error
Unable to resolve module react-native-action-button from index.ios.js: Invalid directory /Users/node_modules/react-native-action-button

react-native 20-rc1 exposes peer dependency issue

Hello, I have package.json as

  "dependencies": {
    "react-native": "0.20.0-rc1",

    "@remobile/react-native-splashscreen": "^1.0.3",
    "fbemitter":"^2.0.2",


    "react-native-blur": "^0.7.6",
    "react-native-htmlview": "^0.2.0",


    "react-native-action-button": "^1.1.2",
    "react-native-android-statusbar": "^0.1.2",
    "react-native-material-kit": "^0.3.0", 
    "react-native-material-design": "^0.3.2"

    }

Getting

npm WARN EPEERINVALID [email protected] requires a peer of react-native@>=0.11 but none was installed.
npm WARN EPEERINVALID [email protected] requires a peer of react-native@>= 0.11.0 but none was installed.

Is there a fix to address it without changing the version of react-native?

thank you

Make the example copy pastable for noobs like me

This line actually causes an error:

// Rest of App come ABOVE the action button component!

Either mention that this line needs to be removed when using that block of code or mention it in a comment outside the return statement

[Android] Elevation support

Having elevation support to help match material design specs would be great. When I try it out myself, the shadow from the elevation gets cut off.

Gray out / darken the background when clicked

It would be great if the background would darken when the action button is clicked so the attention would be centered in the sub-buttons. In some screens there's so much "noise" that the labels are unnoticeable.

Button changes position when clicked

Someone knows why this happened?

screen shot 2016-01-06 at 18 56 07
screen shot 2016-01-06 at 18 56 20

<View style={{ flex: 1 }}>


    <ActionButton buttonColor="rgba(231,76,60,1)">
        <ActionButton.Item buttonColor='#9b59b6' title="New Task" onPress={() => console.log("notes tapped!")}>
            <Icon name="android-create" style={styles.actionButtonIcon} />
        </ActionButton.Item>
        <ActionButton.Item buttonColor='#3498db' title="Notifications" onPress={() => {}}>
            <Icon name="android-notifications-none" style={styles.actionButtonIcon} />
        </ActionButton.Item>
        <ActionButton.Item buttonColor='#1abc9c' title="All Tasks" onPress={() => {}}>
            <Icon name="android-done-all" style={styles.actionButtonIcon} />
        </ActionButton.Item>
    </ActionButton>
</View>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.