New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled attribute not working in button #236

Closed
ampeixoto opened this Issue Oct 10, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@ampeixoto

ampeixoto commented Oct 10, 2015

Hello,

I'm using this link (http://robobinding.github.io/RoboBinding/old_binding_attributes.html) to check which attributes are available.

I'm trying to use the "enable" attribute in a button like this:

<Button
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="start"
     android:id="@+id/start_button"
     bind:enable="{canStart}" />

But whenever I run the application, I'm getting the following error:

enabled: Unrecognized attribute 'enabled'
    -------------------------The first error stack trace-----------------------
    enabled: Unrecognized attribute 'enabled'
            at org.robobinding.PendingAttributesForViewImpl.getResolutionErrors(PendingAttributesForViewImpl.java:43)
            at org.robobinding.binder.BindingAttributeResolver.resolve(BindingAttributeResolver.java:39)
            at org.robobinding.binder.BindingViewInflater.resolveAndAddViewBindingAttributes(BindingViewInflater.java:90)
            at org.robobinding.binder.BindingViewInflater.onViewCreated(BindingViewInflater.java:85)
            at org.robobinding.ViewFactory.notifyViewCreatedIfNotNull(ViewFactory.java:65)
            at org.robobinding.ViewFactory.onCreateView(ViewFactory.java:58)
            at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:177)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:725)
......

If I change to "visibility" attribute it works fine.

Is the "enabled" attribute supported in buttons?

@ampeixoto

This comment has been minimized.

ampeixoto commented Oct 11, 2015

@weicheng113

Ok. I managed to solve this using the resources you pointed out. Is there any list of attributes supported by default? Because the link I posted seems to be out of date...

@weicheng113

This comment has been minimized.

Member

weicheng113 commented Oct 11, 2015

https://github.com/RoboBinding/RoboBinding -> API and Binding Attributes JavaDocs(click on the link) -> click to view a package doc(e.g., org.robobinding.widget.view)

If this is not up-to-date, you can check view bindings for attribute mappings, for example - https://github.com/RoboBinding/RoboBinding/blob/develop/framework/src/main/java/org/robobinding/widget/view/ViewBindingForView.java

@ampeixoto

This comment has been minimized.

ampeixoto commented Oct 11, 2015

Ok. Thank you.
But just for your information, it seems that is something wrong with the page enconding. Take a look at the following image:

image

@weicheng113

This comment has been minimized.

Member

weicheng113 commented Oct 12, 2015

Thanks, will try to fix it in next release.

@weicheng113 weicheng113 added this to the v0.8.11 milestone Oct 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment