title: How do I make a dotted/dashed line in Android?
body: <p>I'm trying to make a dotted line. I'm using this right now for a solid line:</p>
  
  <pre><code>LinearLayout divider = new LinearLayout( this );
  LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, 2 );
  divider.setLayoutParams( params );
  divider.setBackgroundColor( getResources().getColor( R.color.grey ) );
  </code></pre>
  
  <p>I need something like this, but dotted instead of solid. I'd like to avoid making hundreds of layouts alternating between a transparent layout and solid layout.</p>