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
10-31 23:09:14.749 14194-14194/com.example.alfattah.absensiproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.alfattah.absensiproject, PID: 14194
java.lang.IllegalArgumentException: You have 3 tabs.
at eu.long1.spacetablayout.SpaceTabLayout.initialize(SpaceTabLayout.java:266)
and this my code :
public class DashboardFragment extends Fragment {
public DashboardFragment() {
// Required empty public constructor
}
SpaceTabLayout tabLayout;
List<Fragment> fragmentList = new ArrayList<>();
CheckinFragment checkinFragment = new CheckinFragment();
MapsFragment mapsFragment = new MapsFragment();
CheckOutFragment checkOutFragment = new CheckOutFragment();
ViewPager dashboardViewpager;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_dashboard, container, false);
dashboardViewpager = view.findViewById(R.id.viewPagerdashboard);
tabLayout = view.findViewById(R.id.spaceTabLayout);
fragmentList.add(checkinFragment);
fragmentList.add(mapsFragment);
fragmentList.add(checkOutFragment);
tabLayout.initialize(dashboardViewpager, getActivity().getSupportFragmentManager(), fragmentList, savedInstanceState);
return view;
}
@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
tabLayout.saveState(outState);
super.onSaveInstanceState(outState);
}
@Override
public void onStart() {
super.onStart();
}
}
The text was updated successfully, but these errors were encountered:
10-31 23:09:14.749 14194-14194/com.example.alfattah.absensiproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.alfattah.absensiproject, PID: 14194
java.lang.IllegalArgumentException: You have 3 tabs.
at eu.long1.spacetablayout.SpaceTabLayout.initialize(SpaceTabLayout.java:266)
and this my code :
public class DashboardFragment extends Fragment {
}
The text was updated successfully, but these errors were encountered: