| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 
 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
 
        int imgNumber = mPageNumber + 1;
        String strImg = "ss0" + imgNumber;
        ViewGroup rootView = (ViewGroup) inflater.inflate(
                R.layout.fragment_ssstretch4_split, container, false);
 
        // Set the title view to show the page number.
        ((TextView) rootView.findViewById(R.id.text1)).setText(
                getString(R.string.title_activity_ssstretch4_split, mPageNumber + 1));
 
        //Mettre l'image
        int idImg = getResources().getIdentifier("com.trainwithcoachminiil.app:drawable/" + strImg, null, null);
        ((ImageView) rootView.findViewById(R.id.imgSS)).setImageResource(idImg);
 
        //Lancer le timer
        textActivity = (TextView) rootView.findViewById(R.id.textActivity);
        textCountDown = (TextView) rootView.findViewById(R.id.textCountDown);
        countDownTimerPrepare = new CountDownTimerActivityPrepare(startTimePrepare, interval);
        textActivity.setText(R.string.activityPrepare);
        textCountDown.setText(String.valueOf(startTimePrepare/1000));
        countDownTimerPrepare.start();
 
        return rootView;
    } | 
Partager