title: How to set style to a progressBar programmatically on Android
body: <p>I have ProgressBar style in style.xml.
  When I create layout, put there ProgressBar and set style like:</p>
  
  <pre><code>style="@style/ProgressBarStyle"
  </code></pre>
  
  <p>set layout to dialog and all is fine. </p>
  
  <p>Other way create view for dialog programmatically.
  So for ProgressBar I have next code:</p>
  
  <pre><code>new ProgressBar(context, null, R.style.ProgressBarStyle);
  </code></pre>
  
  <p>But in this way there is nothing instead ProgressBar.</p>
  
  <p>P.S. I don't forget add ProgressBar to view which I set as dialog view.</p>