Я пытаюсь добавить несколько кнопок в макет, например:
for( int i = 0; i < 10; i++ ) {
Button button = new Button( this );
button.setText( "" + i );
( ( LinearLayout )dialog.findViewById( R.id.Buttons ) ).addView( button );
}
Моя проблема заключается в том, как сделать это программно для всех кнопок:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textSize="32dip" />
Я смотрю на LayoutParams, но он не выглядит полным.Например, как установить textSize на 32 dip?