0

I am having an issue using nineoldandroids. My Logcat is:

06-17 18:46:59.810: E/AndroidRuntime(1576): FATAL EXCEPTION: main
06-17 18:46:59.810: E/AndroidRuntime(1576): java.lang.StackOverflowError
06-17 18:46:59.810: E/AndroidRuntime(1576):     at com.nineoldandroids.util.IntProperty.set(IntProperty.java:43)
06-17 18:46:59.810: E/AndroidRuntime(1576):     at com.nineoldandroids.util.IntProperty.set(IntProperty.java:43)
06-17 18:46:59.810: E/AndroidRuntime(1576):     at com.nineoldandroids.util.IntProperty.set(IntProperty.java:43)

and my code is:

button.setOnClickListener(new View.OnClickListener() {

                public void onClick(View v) {

                    ObjectAnimator objectAnimator= ObjectAnimator.ofInt(miscrol, "scrollY", 0, 480).setDuration(duration);
                    objectAnimator.start();

                }
            });

What I am doing wrong? thank you.

user3733523
  • 151
  • 1
  • 2
  • 11
  • You should have a loop in your code that is calling a method too much time. Can you post more of your code? – G.T. Jun 17 '14 at 18:14
  • I only have an AsyncTask to get the values of web service. The animation I do to an Scrollview, is it possible or I have to change? thanks – user3733523 Jun 17 '14 at 18:23
  • Add an `@Override` annotation before your `onClick` method. It might not change anything but it is worth to test it. – G.T. Jun 17 '14 at 18:32
  • no, not change anything :( – user3733523 Jun 17 '14 at 19:11
  • I don't know why you get this error. But you can use the `smoothScrollBy()` method on your `scrollView` to make it scroll by a specific position. It will be easier than using an `ObjectAnimator`. – G.T. Jun 17 '14 at 19:23

0 Answers0