title: How to dynamic change a view's width and height in android?
body: <p>In my chat program, in order to show the length of the voice, I use a custom <code>LinearLayout</code> to display for users, it has two <code>TextView</code> ,one is to show how much time the voice has, the other is to show how long the voice is, </p>
  
  <p>For example: a 10s length voice's <code>TextView</code> width is <code>20dp</code>, a 5s length voice's <code>TextView</code> width is <code>10dp</code>.</p>
  
  <p>How can I fix it ? </p>