@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LayoutInflater inflater = getActivity().getLayoutInflater(); mainView = inflater.inflate( R.layout.item_lesson_type5_2, (ViewGroup) getActivity().findViewById(R.id.vp), false); imgLine1 = (ImageView) mainView.findViewById(R.id.imgLine1); imgLine2 = (ImageView) mainView.findViewById(R.id.imgLine2); imgLine3 = (ImageView) mainView.findViewById(R.id.imgLine3); imgLine4 = (ImageView) mainView.findViewById(R.id.imgLine4); imgLock1 = (ImageView) mainView.findViewById(R.id.imgLock1); imgLock2 = (ImageView) mainView.findViewById(R.id.imgLock2); imgLock3 = (ImageView) mainView.findViewById(R.id.imgLock3); imgStart1 = (ImageView) mainView.findViewById(R.id.imgStart1); imgStart2 = (ImageView) mainView.findViewById(R.id.imgStart2); imgStart3 = (ImageView) mainView.findViewById(R.id.imgStart3); rbStar1 = (RatingBarView) mainView.findViewById(R.id.rbStar1); rbStar2 = (RatingBarView) mainView.findViewById(R.id.rbStar2); rbStar3 = (RatingBarView) mainView.findViewById(R.id.rbStar3); imgModule1 = (ImageView) mainView.findViewById(R.id.imgModule1); imgModule1.setOnClickListener(this); imgModule2 = (ImageView) mainView.findViewById(R.id.imgModule2); imgModule2.setOnClickListener(this); imgModule3 = (ImageView) mainView.findViewById(R.id.imgModule3); imgModule3.setOnClickListener(this); }