Android: Trying to change width of TextView at runtime

后端 未结 1 1368
萌比男神i
萌比男神i 2021-01-21 14:57

I have a textView that I\'m trying to change the size at runtime. But the size does not chnage.

The code in the xml file

 

        
1条回答
  •  清歌不尽
    2021-01-21 15:29

    Use this:

    t.getLayoutParams().width = 950;

    0 讨论(0)
提交回复
热议问题