I am trying to add a few buttons to a layout like this:
for( int i = 0; i < 10; i++ ) { Button button = new Button( this ); button.setText( "" + i ); ( ( LinearLayout )dialog.findViewById( R.id.Buttons ) ).addView( button ); }
My problem is how can I do this programmatically for all buttons:
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:textSize="32dip" />
I am looking at LayoutParams, but it does not look complete. For example, how do I set textSize to 32 dip?
Espen
source share