title: How to get height/width of a RecyclerView cell in onBindViewHolder?
body: <p>I've seen other answers to this question but none worked for me; for example the top answer here (<a href="https://stackoverflow.com/questions/38764254/how-to-get-the-height-of-recyclerview-item-in-onbindviewholder">How to get the height of recyclerview item in &quot;onBindViewHolder&quot;</a>) says to do this:</p>
  <pre><code>view.measure(
               View.MeasureSpec.makeMeasureSpec(recyclerViewWidth, View.MeasureSpec.EXACTLY),
               View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
  </code></pre>
  <p>but then doing <code>view.getMeasuredHeight()</code> only returns whatever I pass in for <code>recyclerViewWidth</code>.</p>
  <p>Basically I want to set the size of components within the recycler view cell as fractions of the cell's size, but those fractions depend on the position of the cell. I'm a bit frustrated since this is so simple to do in iOS and seems so much more convoluted in android.</p>