What is an alternative for using com.nineoldandroids library - android

I want to replace the dependency of com.nineoldandroids library from my project and replace it with an android native library.
I am trying to make a project based on this http://www.tutecentral.com/android-swipe-listview/ .
However, I don't need to have support for android versions less than v11. Therefore there is no need to use this library. But I cannot find what to use in its place, while not making changes to the code itself.
The project import the classes
import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.AnimatorListenerAdapter;
import com.nineoldandroids.animation.ValueAnimator;
import com.nineoldandroids.view.ViewHelper;
import static com.nineoldandroids.view.ViewHelper.setAlpha;
import static com.nineoldandroids.view.ViewHelper.setTranslationX;
import static com.nineoldandroids.view.ViewPropertyAnimator.animate;
Thank you.

I had the same issue, wanted to get rid of nineoldandroids library.
As per #Selvin comment this is what you need to do:
1.) Remove all Imports
2.) Animation and ValueAnimator are available as part of the android.animation package
3.) ViewHelper doesn't really do anything that is not already available as part of each view's method.
For example:
ViewHelper.setScaleX -> view.setScaleX
ViewHelper.setY -> view.setY
ViewHelper.setAlpha -> view.setAlpha
Hope it helps.

Related

Cannot locate ChangeText class/symbol

I am trying to add some animation in my Android app for a text change on a TextView.
I found a post with sample:
Smooth text change in android animation
Sample code:
TransitionManager.beginDelayedTransition(transitionsContainer,
new ChangeText().setChangeBehavior(ChangeText.CHANGE_BEHAVIOR_OUT_IN));
I have imported the following package:
import androidx.transition.TransitionManager;
However, when I use this, I get an error in Android Studio: Cannot resolve symbol ChangeText
What am I missing? Please help!
The original Answer mentions that a library is needed:
If you want to support Android 4+. check out the Transitions Everywhere lib. You can achieve all sorts of different animations with backward compatibility.
Here you can find some examples.
Therefore you might need to install the library via gradle and then import it like so:
import com.transitionseverywhere.ChangeText;
or
import com.transitionseverywhere.*;

Replacing old library with another

I'm new in android programming , I downloaded project that uses holoeverywhere library so I wont to know if I can replace it by another one (like ActionBarSherlock replaced by AppCompat ) ? the project uses those , how I deal with it?
import org.holoeverywhere.app.Activity;
import org.holoeverywhere.widget.LinearLayout;
import org.holoeverywhere.widget.datetimepicker.date.DatePickerDialog;
I found this tutoria here but I its not working for me !
I can replace it with new library according to my code (my imports) ?
Please I need any solution !!

How remove unnecessary import from package eclipse for android

How remove unnecessary import from package eclipse for android.
When i add some method after removing it the import statements not getting remove.
Is there a way to remove from entire application...
Instead of removing one by one.
You can use ctr + shift + o for removing unnecessary import of your class.
It is not just for removing but also used for importing the class that is not yet imported to your class.
The only way by which you import all defined packages that means
CTRL+SHIFT+O

Android L - android.graphics.outline

According to the android developer page for the developer preview of L, it's possible to use the Outline class & define outlines for view's to display the shadows in the correct way.
(http://developer.android.com/preview/material/views-shadows.html#shadows)
In my case, the "L"-sdk I use, didn't found it. Therefore I couldn't import and use the class.
According to the test project, stored in sdk/samples/android-L/ui/views/Elevation/ElevationDrag this class should be stored in "android.graphics.outline", but even in this project it can't be located correctly.
Is this feature not implemented in the developer preview yet or did I missed something?
Finally got it.
It's a bug in android studio. I just added manually the import to my activity:
import android.graphics.Outline
It will be shown as error, but it can compile & run.
I hope they will fix this soon.
EDIT: I created an issue here: https://code.google.com/p/android/issues/detail?id=72788&q=android%20studio%20android%20l&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
It looks like, they're working on it.
The same problem than you but your answer it didn't work for me, I am trying to import
import android.graphics.outline;
And de output is:
Error:(7, 24) error: cannot find symbol class outline
The build.gradleseems to be well configurated with the
compileSdkVersion 'android-L'
sentence
** Fixed
the right import is: import android.graphics.Outline;

I want import android.provider.Calendar;

i want import
import android.provider.Calendar;
how can i import this class in my application
I believe this is still not part of the public SDK.
You can still read the data though, I wrote an article about it: http://jimblackler.net/blog/?p=151
The class isn't public.
See http://groups.google.com/group/android-developers/browse_thread/thread/ae95c372af20f39e?pli=1
you can use the GIT file,it's free from google.in the git you will find all the classes of calender for android.

Categories

Resources