1

I need some help! I've downloaded the example for screen slide from http://developer.android.com/training/animation/screen-slide.html#views and it worked fine, the thing is that when i try to add it to my project I cant make it work... Ive added android-support-v13.jar as a referenced library and all errors disappeared, but when i launch the activity for the screenslide I have these errors:

04-23 13:03:02.671: W/dalvikvm(2820): Unable to resolve superclass of Lcom/example/ccc/ScreenSlideActivity$ScreenSlidePagerAdapter; (151)
04-23 13:03:02.671: W/dalvikvm(2820): Link of class 'Lcom/example/cccc/ScreenSlideActivity$ScreenSlidePagerAdapter;' failed
04-23 13:03:02.671: E/dalvikvm(2820): Could not find class 'com.example.ccc.ScreenSlideActivity$ScreenSlidePagerAdapter', referenced from method com.example.ccc.ScreenSlideActivity.onCreate
04-23 13:03:02.681: W/dalvikvm(2820): VFY: unable to resolve new-instance 1074 (Lcom/example/ccc/ScreenSlideActivity$ScreenSlidePagerAdapter;) in Lcom/example/ccc/ScreenSlideActivity;

I know it has something to do with FragmentManager not finding its constructor, I have tried importing the support.v4 FragmentManager but it didint work:

Error: The constructor MainActivity.ScreenSlidePagerAdapter(FragmentManager) is undefined

need help to fix code for getting current view in viewpager

Community
  • 1
  • 1
Topo
  • 56
  • 6

1 Answers1

0

I finally could solve it! I removed android-support-v13.jar and corrected all the imports:

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

And the most important was this one:

import android.support.v4.app.FragmentStatePagerAdapter;

Because that was the only import that originally was v13 from the example from http://developer.android.com/training/animation/screen-slide.html. These changes were made in ScreenSlidePageFragment and ScreenSlidePagerActivity. I could reach the solution thanks to the linked posts.

Topo
  • 56
  • 6