0

Here is the code line where I am getting the error:

ImagePagerAdapter adapter = new ImagePagerAdapter(((Activity)getContext()).getFragmentManager());

Error is not coming at the runTime, It comes in the project. when I take the cursor on error and for the recommended solution. I click and the change happened in the

ImagePagerAdater(android.app.FragmentManager fragmentManager) 

Constructor and super gives error after the change and ImagePagerAdapter class is below:

ImagePagerAdapter.java

public class ImagePagerAdapter extends FragmentStatePagerAdapter {
    public ImagePagerAdapter(FragmentManager fragmentManager){
        super(fragmentManager);
    }
    @Override
        ...
}

study link from where I start this

Akarsh M
  • 1,629
  • 2
  • 24
  • 47
  • Fascinating. And which error would that be? (A.k.a. please post a stacktrace or LogCat output) – Patrick Jul 29 '13 at 12:06
  • Error is not coming at the runTime. It comes in the project. when I take the cursor on it and for the recommended solution. I click and the change happened in the ImagePagerAdater(android.app.FragmentManager fragmentManager) constuctor and super gives error after did this. @Patrick – Akarsh M Jul 29 '13 at 12:11
  • Watch out the support package you are using and unify all your codes for the version you have selected. – LightYearsBehind Jul 29 '13 at 12:16
  • @haike00 : I added some detail, may be it will help you to understand the problem and The code is proper , I just added where I am getting error. – Akarsh M Jul 29 '13 at 12:20
  • I believe you are using a mix between V4 and V13 support package. For instance, you do `public class MainActivity extends FragmentActivity` (V4) but `getFragmentManager()` (V13) gets called to pass into your FragmentStatePagerAdapter. – LightYearsBehind Jul 29 '13 at 12:25
  • @haike00 : both package are the same – Akarsh M Jul 29 '13 at 12:30
  • Post your complete code, i will see what i can do. – LightYearsBehind Jul 29 '13 at 12:30
  • @haike00 : I am not extands either Activity nor FragmentActivity. there is extends LinearLayout – Akarsh M Jul 29 '13 at 12:32

0 Answers0