• Mail
  • Yelp
  • Twitter
  • LinkedIn
  • Youtube
US +1 855 885 DART
Code Dart
  • home
  • services
  • articles
  • samples
  • connect
  • i
  • Search
  • Menu

Customize and streamline percent series adjustments

Check out the View binding library at Bintray
Check out the Math library at Bintray

Build instance for chaining adjustment definitions


ListAdapter(List rateables,
  double magnitude, double precision) {
 ...
 mRateraid = Rateraid.withObjects(
   rateables,
   magnitude,
   precision,
   clickedView -> notifyDataSetChanged());
}

– Or –

ListAdapter(List percents,
  double magnitude, double precision) {
 ...
 mRateraid = Rateraid.withValues(
   percents,
   magnitude,
   precision,
   clickedView -> notifyDataSetChanged());
}

Define different types of adjustments

@Override public void onBindViewHolder(
@NonNull final ViewHolder holder, int position) {
 mRateraid
   .addShifters(
     holder.mIncrementButton,
     holder.mDecrementButton,
     position)
   .addEditor(holder.mEditText, position, null);
   .addRemover(holder.mRemoveButton, position, null)


– Or –

   .addEditor(holder.mEditText, position, mInputManager);
   .addRemover(
     mRemoveDialog.getButton(BUTTON_NEGATIVE),
     position,
     mRemoveDialog)
   );
 holder.mRemoveButton.setOnClickListener(
   clickedView -> mRemoveDialog.show());
}

VIEW API DOCS

With Rateraid, developers can define behaviors for different types of interactions with a percent series in a single statement.

Features: Bind predefined as well as custom behaviors to the views controlling adjustments to optionally increment and decrement, remove or text edit the values of a percent series. Single element adjustments automatically update all values in the series as needed to maintain that their sum remain proportionate to the whole within range of the specified precision. The Java math library stands alone for further customized or platform agnostic implementations.

Role: I created the logic for the Android and Java libraries from scratch.  The Android library is built atop the Android architecture, and both libraries rely on the JUnit test framework.  The libraries are implemented in a complementary demo app as well as Giftab.

Accelerate your progress

Learn how Code Dart can help you reach your goals

EXPLORE MORE FREE CONSULT

US +1 855 539 3588

Copyright © 2021 by Code Dart, all rights reserved.
Scroll to top