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

Set specific counter value while opening the view #3

Open
reversecoder opened this issue Mar 15, 2018 · 3 comments
Open

Set specific counter value while opening the view #3

reversecoder opened this issue Mar 15, 2018 · 3 comments

Comments

@reversecoder
Copy link

Hello,

Thanks for your nice library. It sets counter value as 1 while opening the view. At the very first time while opening the view I want to set some specific value. I tried changing some code into IncrementProductView and BoardView classes. But no luck.

Thanks for any workaround.

@soulyaroslav
Copy link
Contributor

soulyaroslav commented Mar 19, 2018

Hey,

As I understood you want to set default value what different from 1? If so I thing you only need add getter method to get BoardView in the IncrementProductView. Something like this:

IncrementProductView view = (IncrementProductView) findViewById(R.id.productView);
// use getter, now IncrementProductView doesn't have this behave
view.getBoardView().setCount(5);
// or encapsulate all this logic inside IncrementProductView
view.setDefaultCount(5);

Please, give me some feedback when you try it, thanks.

@reversecoder
Copy link
Author

Thanks for your reply.

Yes, I managed the view using setcount of BoardView. I have added a method in IncrementProductView for setting counter of boardview.

Again Thanks for your beautiful library. Best of Luck.

@soulyaroslav
Copy link
Contributor

soulyaroslav commented Mar 19, 2018

Welcome, I am glad that anybody uses it:)

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