title: How do I set an Android ProgressBar's Size programmatically?
body: <p>I have a custom view that extends <code>ViewGroup</code>. It includes a <code>ProgressBar</code> and a <code>WebView</code>. I'm displaying the <code>ProgressBar</code> while the <code>WebView</code> is loading.</p>
  
  <p>This works, but the <code>ProgressBar</code> is too big. How do I make it smaller?</p>
  
  <p>Below is my non-working code:</p>
  
  <pre><code>webView = new WebView(context);
  webView.setWebViewClient(new MyWebChromeClient());
  webView.loadUrl("file://" + path);
  addView(webView);
  
  progressBar = new ProgressBar(mContext, null,
                                           android.R.attr.progressBarStyleSmall);
  LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT,
                                                      LayoutParams.WRAP_CONTENT);
  progressBar.setLayoutParams(params);
  
  addView(progressBar);
  </code></pre>