Skip to content
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

Cannot resolve symbol 'adapter' #72

Closed
AnirudhJ3 opened this issue Jul 16, 2020 · 4 comments
Closed

Cannot resolve symbol 'adapter' #72

AnirudhJ3 opened this issue Jul 16, 2020 · 4 comments

Comments

@AnirudhJ3
Copy link

AnirudhJ3 commented Jul 16, 2020

I copied the code given in Readme to get started but I got the error at 'adapter = new GraphAdapter<GraphView.ViewHolder>(graph) {' line saying "Cannot resolve symbol 'adapter'". I tried resolving it but implementing suggested resolution of declaring it as type GraphAdapter. After doing this I'm getting error at line 'adapter.setLayout(.....)' since setLayout class is not there in GraphAdapter class but in GraphView class. Please help

@DennisBlock
Copy link
Contributor

You're right. There are some errors in the ReadMe.

You can look at the sample project how it is done correctly. But what you did is correct. Declaring adapter as GraphAdapter and using graphView.setLayout() instead of adapter.setLayout() should work.

@AnirudhJ3
Copy link
Author

Thanks for the quick response. Also how to add node to the layout dynamically from a button click?

@DennisBlock
Copy link
Contributor

Checkout the sample here.

@AnirudhJ3
Copy link
Author

Got it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants