0
Im新的android和im試圖創建一個web查看與片段 和我在WebViewFragment getitem(), 的Adapter類中發生錯誤說「返回類型不兼容THE fragmentPagerAdapter」請幫助,因爲IM卡使用片段創建Web視圖
import homePage.HotDeals;
import homePage.NewArrivals;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.webkit.WebViewFragment;
public class HomePageAdapter extends FragmentPagerAdapter{
public HomePageAdapter(FragmentManager fm) {
super(fm);
// TODO Auto-generated constructor stub
}
@Override
public WebViewFragment getItem(int index) {
// TODO Auto-generated method stub
switch(index){
case 0:
return new NewArrivals();
case 1:
return new HotDeals();
}
return null;
}