안녕하세요..
뷰페이저에서 각 페이지를 눌렀을때 각 페이지의 이미지마다 , 동적으로 작동하게 하려고 하는데.. 왜 어디가 잘못되어서 이렇게 안되는것일까요.. 빨간색 으로 줄친 부분때문에 에러가 난다고 스튜디오에서는 알려줍니다.
intent.putExtra("image",at_thumnail.get(res)); <-- 이 부분입니다.
소스가 길어서 8000자 제한이 되기 떄문에.. 답변 부분에 이어서 소스를 한번 붙여보겠습니다 ㅠ
꼭좀 알고싶습니다 ㅠ ㅠ

public class HappyLife extends AppCompatActivity {
private SectionsPagerAdapter mSectionsPagerAdapter;
public static ArrayList<Integer> at_thumnail = new ArrayList<>();
public static ArrayList<String> at_title = new ArrayList<>(); public static ArrayList<String> at_ReservationPercent = new ArrayList<>();
private ViewPager mViewPager;
static String ARG_SECTION_NUMBER = "section_number";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setTitle("화면 ");
setContentView(R.layout.activity_happy_life);
at_title.add("1");
at_title.add("2");
at_ReservationPercent.add("1번 응답");
at_ReservationPercent.add("2번 응답");
at_thumnail.add(R.drawable.a1);
at_thumnail.add(R.drawable.a2);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
}
public static class PlaceholderFragment extends Fragment {
public PlaceholderFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final int position = getArguments().getInt(ARG_SECTION_NUMBER);
View rootView = inflater.inflate(R.layout.fragment_sub2, container, false);
TextView title = (TextView) rootView.findViewById(R.id.title);
title.setText(at_title.get(position));
TextView Percent = (TextView) rootView.findViewById(R.id.Reservation_Percent);
Percent.setText(at_ReservationPercent.get(position));