title: Varying windowSoftInputMode for fragments inside the viewpager
body: <p>I have a ViewPager with 2 different fragments.
  For the first fragment, I would like to define it so that it does not resize upon the soft keyboard opening.
  For the second fragment, I would like to have it resize.</p>
  
  <p>Setting the <code>android:windowSoftInputMode="adjustPan"</code> inside the manifest will work for both fragments, but I want to vary it between the two.</p>
  
  <p>What I've done after google searches :</p>
  
  <pre><code>    // create ContextThemeWrapper from the original Activity Context with the custom theme
      Context context = new ContextThemeWrapper(getActivity(), R.style.NoResize);
      // clone the inflater using the ContextThemeWrapper
      LayoutInflater localInflater = inflater.cloneInContext(context);
      // inflate using the cloned inflater, not the passed in default
      return localInflater.inflate.inflate(R.layout.my_layout,container,false);
  </code></pre>
  
  <p>I've custom defined the theme to be :</p>
  
  <pre><code>&lt;style name="NoResize" parent="@style/AppTheme"&gt;
      &lt;item name="android:windowSoftInputMode"&gt;adjustPan&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>The activity is defined with default windowSoftInputMode which resizes the views when softkeyboard opens up.</p>
  
  <p>Will be working on this until it gets solved but if anyone else has this problem and solved it, it would be awesome to hear any thoughts.</p>
  
  <p>Thanks!</p>