I’m trying to make a dotted line. I’m using this right now for a solid line:
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 ) );
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.
Without java code:
drawable/dotted.xml:view.xml:Effect:
