ashik94vc / ElegantNumberButton

Widget which acts as a number counter which changes its number on +/- press.
Apache License 2.0
180 stars 62 forks source link

NullPointerException #16

Open ghost opened 6 years ago

ghost commented 6 years ago

in RVAdapter,

public static ElegantNumberButton button;

in MainActivity,

SubMenuRVAdapter.button.setNumber("0");

When I click Send button, I want to set ElegantNumberButton number "0" as a default. This ElegantNumberButton, findViewById come from RVAdapter.

ashik94vc commented 6 years ago

The problem for you is in SubMenuRVAdapter. I don't exactly know what's happening unless I can see the Log or at least your code for SubMenuRv Adapter where you're calling ElegantNumberButton. I'd also advice you to not make the button as static. This doesn't initialize the object.