Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

set height of layout programmatically android

// Gets linearlayout
LinearLayout layout = findViewById(R.id.numberPadLayout);
// Gets the layout params that will allow you to resize the layout
LayoutParams params = layout.getLayoutParams();
// Changes the height and width to the specified *pixels*
params.height = 100;
params.width = 100;
layout.setLayoutParams(params);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #height #layout #programmatically #android
ADD COMMENT
Topic
Name
4+7 =