在我的班黎巴嫩我有这个班:
class TabFactory implements TabContentFactory {
private final Context mContext;
public TabFactory(Context context) {
mContext = context;
}
public View createTabContent(String tag) {
View v = new View(mContext);
v.setMinimumWidth(0);
v.setMinimumHeight(0);
return v;
}
}
这是错误:
private static void AddTab(
SherlockFragmentActivity activity, TabHost tabHost,
TabHost.TabSpec tabSpec, TabInfo tabInfo) {
// TODO Auto-generated method stub
tabSpec.setContent(activity.new TabFactory(activity));
这里实际上我有这个错误:
SherlockFragmentActivity.TabFactory cannot be resolved to a type
我知道这个方法在 SherlockFragmentActivity 中有效,但是它在 SherlockFragment 中是如何工作的?!