-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDetailPagerAdapter.java
41 lines (31 loc) · 962 Bytes
/
DetailPagerAdapter.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package in.co.whiznet.nurseryapp;
import android.content.Context;
import android.speech.tts.TextToSpeech;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;
import android.widget.Toast;
import java.util.List;
public class DetailPagerAdapter extends FragmentPagerAdapter implements TextToSpeech.OnInitListener {
List<Alphamodal> data;
public DetailPagerAdapter(FragmentManager fm, List<Alphamodal> data) {
super(fm);
this.data=data;
}
@Override
public Fragment getItem(int position) {
Log.d("position",position+"");
if (position==26){
return ScoreFragment.newInstance("","");
}
return DetailFragment.newInstance(data.get(position));
}
@Override
public int getCount() {
return 27;
}
@Override
public void onInit(int i) {
}
}