Page 496 - 3-3
P. 496
public void onAnimationEnd(Animation animation) {
Intent intent = new Intent(getActivity(), TowerMainActivity.class);
startActivity(intent);
}
});
scale.startAnimation(animation);
}
});
return rootView;
}
}
// Tab 에 표시될 Fragment 를 return 하는 Adapter Class
public class SectionsPagerAdapter extends FragmentPagerAdapter {
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
}
// 0~2 번 개(3 ) Page 각각의 Fragment 지정
@Override
public Fragment getItem(int position) {
switch (position) {
case 0: return new ElevatorFragment();
case 1: return new ParkingFragment();
case 2: return new TowerFragment();
}
return null;
}
// 총 Page 개수
@Override
public int getCount() {
return 3;
}
// Tab 에 표시될 제목
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return "Iot Elevator";
case 1:
return " 무인 주차장";
- 496 -