Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

ActionBarSherlock and NineOldAndroids #409

Closed
tprochazka opened this issue Mar 27, 2012 · 3 comments
Closed

ActionBarSherlock and NineOldAndroids #409

tprochazka opened this issue Mar 27, 2012 · 3 comments

Comments

@tprochazka
Copy link

Why ActionBarSherlock use differend package name for NineOldAndroids? Can I use it or it's better add new dependency for original NineOldAndroids... and have it twice :-(

Especially for maven distribution will be best set NineOldAndroids as dependency in ActionBarSherlock pom.

@JakeWharton
Copy link
Owner

There are a lot of things that went into this decision:

  1. The requirements of ABS are different than that of someone using NOA directly. ABS focuses on porting the ICS action bar back to all platforms with the least amount of changes possible. This involved creating special Nine-prefixed classes which allow for direct access to methods which would otherwise not be available on some platforms (e.g., setTranslationX, setAlpha). There are also a bunch of other methods and implementations which are ripped out in the ABS version. I originally planned to include these in NOA but thought that it would be more clear to users if they had to explicitly wrap their views in order to have direct access to these properties (i.e., AnimatorProxy.wrap(view).setAlpha(.5f).
  2. NOA includes a lot of classes that ABS does not need. Things like the compatibility implementation of ViewPropertyAnimator and the implementations of the Property class are not useful to ABS. This would unnecessarily bloat the library (though very, very minimally).
  3. ADT does not automatically add transitive dependencies when using Eclipse. Most users who develop Android use Eclipse and are required (with ABS v4 and on) to have a copy of the android-support-v4.jar file in their own applications libs/ folder. Having another .jar file that they also had to include would lead to confusion and more support emails.

The "straw the broke the camel's back" (as they say) is point 3. If (when?) ADT is updated to allow library projects to be distributed as standalone binaries then perhaps I can re-evaluate including NOA directly. If everyone used Maven or Ant or IntelliJ this wouldn't be a problem but a vast majority of people are on Eclipse and it wouldn't be fair to them since a lot already have trouble getting the library set up and usable.

I'm going to close this issue for now but know that I haven't forgotten nor will I forget about it.

@tprochazka
Copy link
Author

Thanks for great explanation and I agree.

@rajkumarwaghmare
Copy link

Making translation animation using nineoldandroid. Behavior is as expected/accurate on 4.X devices but when tested on 2.3.X devices there is inaccuracy in exact element positions.

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

No branches or pull requests

3 participants