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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -