Change the width of a ProgressBar added at runtime

前端 未结 3 1550
孤独总比滥情好
孤独总比滥情好 2020-12-16 04:41

I am building up a UI from code and can successfully add ProgressBar widgets, however I cannot alter the dimensions of the widget to values I need, it always stays at the de

3条回答
  •  离开以前
    2020-12-16 05:39

    There are minWidth/minHeight/maxWidth/maxHeight parameters as well, but (I think) they can only be set through XML or via a style/theme.

    Otherwise, you could inflate your ProgressBar view from XML.

提交回复
热议问题