As mentioned by user5292387, oncreateview has been added. Instead of suppressing lint, I used
@TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public View onCreateView(View parent, String name, Context context, AttributeSet attrs) { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ? super.onCreateView(parent, name, context, attrs) : super.onCreateView(name, context, attrs); }
The first super call is for devices running Honeycomb Android OS and above. The second challenge is super - for devices with less than Honeycomb Android OS. I think it looks cleaner rather than returning null. However, the android documentation states that returning null will result in a default behavior. Any solution should work, however I am skeptical about returning null, as this can have adverse effects in later versions of the Android SDK.
Savageking
source share