NSouth
NSouth

Reputation: 5276

onCreateView() Requires API level 11.. how to support Activities on older devices (Android Activity)

So far I've only bothered supporting Android API 11 and above, but this app is super simple, so I thought I'd try supporting down to 8. Eclipse only has one complaint, and that's my onCreateView method. How do I handle this without raising my minSDK version?

@Override
public View onCreateView(View parent, String name, Context context,
        AttributeSet attrs) {
    // TODO Auto-generated method stub
    return super.onCreateView(parent, name, context, attrs);  //complains here
}

Upvotes: 0

Views: 440

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007359

Override the three-parameter version of onCreateView() instead, dropping View parent.

Upvotes: 1

Related Questions