title: Android Views Creation Callback
body: <p>Am trying to get a callback on each view and it's AttributeSet, when created in the activity, I tried to use <code>LayoutInflaterCompat.setFactory</code> with a custom <code>LayoutInflaterFactory</code> so I can receive all views created from activity LayoutInflater, but it seems it doesn't handle custom views and any kind of ViewGroup.</p>
  
  <pre><code>public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
      final View view = parentLayoutInflaterFactory.onCreateView(parent, name, context, attrs);
  </code></pre>
  
  <p>in the code above, the view returns null if its a ViewGroup element or a custom view (like support Toolbar).</p>
  
  <p>so What i did is using some reflection to inject a private Factory into the LayoutInflater and it works fine (the same as Calligraphy library).</p>
  
  <p>but am trying to avoid any hacky way, is there a better way to handle this?</p>