kgleong/CodepathWeek1 — pull request #2 by kgleong (2014-09-15 11:46:53+00:00)
Title: Dynamically set height of username textviews upon picasso image load.

* Attempting to resize the `tv*Username` height dynamically in the `onSuccess` picasso callback, so that the username can be centered vertically with respect to the `iv*UserProfileImage` view.
* On initial load, the `tv*Username` text views do not dynamically size. They only resize themselves once the row in the list view needs to be redrawn. I.e., after the row is pushed off screen. See gif below:
* Issue: can't seem to get the UI thread to force refresh/resize the `tvUsername` view.

![hw1_2](https://cloud.githubusercontent.com/assets/588906/4270558/d03ab9f6-3ccc-11e4-9f33-324dc2acd6a7.gif)

* I've tried the following
```java
// in onSuccess()
// after passing in an adapter reference in the constructor
(Activity) adapter.getContext().runOnUiThread( new Runnable ...
...
public void run() {
//set height
tvUsername.invalidate() // I've also tried postInvalidate()
}
...
);
```

this seems to work, but it seems really really inefficient to do this:
```java
onSuccess() {
tvUsername.getParams().height = ivUserProfileImage.getHeight();
adapter.notifyDatasetChanged();
}
```