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
Post a Comment