You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the transitions wont work but all over the app is working fine. It's just the transition effects that aren't working. I've already tried all of them but no luck. There are no errors in the codes too I don't know what I've done wrong so please help. This also my first app so please be kind. :)
I didn't include the instantiateitem on pageradapter because if I do there will be a nullpointerexception. :/
Main Activity:
public class MainActivity extends FragmentActivity {
Fragment Adapter:
public class FragmentAdapter extends FragmentStatePagerAdapter{
public FragmentAdapter(FragmentManager fm) {
super(fm);
// TODO Auto-generated constructor stub
}
@Override
public Fragment getItem(int position)
{
// TODO Auto-generated method stub
Fragment fragment = new Fragment1();
switch(position){
case 0:
fragment = new Fragment1();
break;
case 1:
fragment = new Fragment2();
break;
case 2:
fragment = new Fragment3();
break;
}
return fragment;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return 3;
}
@Override
public boolean isViewFromObject(View view, Object object) {
if(object != null){
return ((Fragment)object).getView() == view;
}else{
return false;
}
}
}
Fragment1:
public class Fragment1 extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
View v = inflater.inflate(R.layout.fragment1_layout, null);
return v;
}
The problem is that the transitions wont work but all over the app is working fine. It's just the transition effects that aren't working. I've already tried all of them but no luck. There are no errors in the codes too I don't know what I've done wrong so please help. This also my first app so please be kind. :)
I didn't include the instantiateitem on pageradapter because if I do there will be a nullpointerexception. :/
Main Activity:
public class MainActivity extends FragmentActivity {
}
Fragment Adapter:
public class FragmentAdapter extends FragmentStatePagerAdapter{
}
Fragment1:
public class Fragment1 extends Fragment {
}
activity_main xml:
<com.jfeinstein.jazzyviewpager.JazzyViewPager xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app1="http://schemas.android.com/apk/res/com.eight.yamjay"
android:id="@+id/jazzy_pager"
app1:style="cubeout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
The text was updated successfully, but these errors were encountered: