title: Android set transparent background for a fragment
body: <p>In my app I have single activity and and all other fragments</p>
  
  <p>I am setting background for activity from style.xml as below</p>
  
  <pre><code>&lt;item name="android:windowBackground"&gt;@color/very_light_gray&lt;/item&gt;
  </code></pre>
  
  <p>Now for only a perticular Fragment I want to set background transparent and I am not able to do that tried below code in Fragment did not work for me</p>
  
  <pre><code>  @Override
   public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
  // create ContextThemeWrapper from the original Activity Context with the custom theme
  final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), R.style.yourCustomTheme);
  
  // clone the inflater using the ContextThemeWrapper
  LayoutInflater localInflater = inflater.cloneInContext(contextThemeWrapper);
  
  // inflate the layout using the cloned inflater, not default inflater
  return localInflater.inflate(R.layout.yourLayout, container, false);
  }
  </code></pre>
  
  <p>Any idea how to do it?</p>