how to set height of a layout with java in android studio -


as can see in code below, want change height of answerbar linear layout

answerbar.setheight(55) 

try this:

answerbar.setlayoutparams(new linearlayout.layoutparams(desiredwidth, 50)); 

or:

answerbar.getlayoutparams().height = 50; answerbar.requestlayout(); 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -