這個 mData.add 識別不了
private void initView() {
mViewPager=(ViewPager)findViewById(R.id.id_viewpager);
mDatas=new ArrayList<Fragment>();
? ?MYConversitation first3=new MYConversitation();
? ?friendConversitation first2=new friendConversitation();
? ?Conversitation first1=new Conversitation();
? ?mDatas.add(first1);
? ?mDatas.add(first2);
? ?mDatas.add(first3);
問題提示是這個
? ?The method add(Fragment) in the type List<Fragment> is not applicable for the arguments (friendConversitation)
?
}
2016-11-30
List的泛型不是fragment 或者不是fragmentV4的包