diff --git a/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java b/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java index 6f9cfc1..2609f1f 100644 --- a/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java +++ b/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java @@ -138,17 +138,6 @@ public View onActivityCreateView(View parent, View view, String name, Context co return mCalligraphyFactory.onViewCreated(createCustomViewInternal(parent, view, name, context, attrs), context, attrs); } - /** - * The LayoutInflater onCreateView is the fourth port of call for LayoutInflation. - * BUT only for none CustomViews. - */ - @Override - @TargetApi(Build.VERSION_CODES.HONEYCOMB) - protected View onCreateView(View parent, String name, AttributeSet attrs) throws ClassNotFoundException { - return mCalligraphyFactory.onViewCreated(super.onCreateView(parent, name, attrs), - getContext(), attrs); - } - /** * The LayoutInflater onCreateView is the fourth port of call for LayoutInflation. * BUT only for none CustomViews. @@ -162,11 +151,11 @@ protected View onCreateView(String name, AttributeSet attrs) throws ClassNotFoun for (String prefix : sClassPrefixList) { try { view = createView(name, prefix, attrs); + if (view != null) break; } catch (ClassNotFoundException ignored) { } } - // In this case we want to let the base class take a crack - // at it. + // In this case we want to let the base class take a crack at it. if (view == null) view = super.onCreateView(name, attrs); return mCalligraphyFactory.onViewCreated(view, view.getContext(), attrs);