Skip to content

valueChanged method  #8

Description

@omkar243

HI travijuu sir, thanks for such custom NumberPicker.
I have query regarding valueChanged method. I want to change remaining values on NumberPicker value changed but not changes dynamically instead it logs correctly. what I already tried posted below but this not working also with limitExceeded method. Plz! give some guidance... Thanks in Advance!

    @Override public void valueChanged(int value, ActionEnum action) {
        String actionText = action == ActionEnum.MANUAL ? "manually set" : (action == ActionEnum.INCREMENT ? "incremented" : "decremented");
        String message = String.format("NumberPicker is %s to %d", actionText, value);
        Log.v(this.getClass().getSimpleName(), message);

        if (Objects.equals(actionText, "incremented")) {
            int s = numberPicker.getValue();
            int x = max - s;
            textViewPending.setText(String.valueOf(x));
        }
    }

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions