Add setRemoveFromHtmlSpace function/ cleanup example by derekcsm · Pull Request #37 · SufficientlySecure/html-textview
This commit adds the option of having HtmlTextView automatically trim the extra "space" that `Html.fromHtml` sometimes adds to the bottom of text, via a simple `setRemoveFromHtmlSpace(boolean)` method. `setRemoveFromHtmlSpace` must be called before setting text for the trailing space to be trimmed off it there are any, it will not work after text is already set since it just simply sets a value that will cause `removeHtmlBottomPadding` to be used in `setHtmlFromString` in the `HtmlTextView` class. I like this approach more than a constructor because it's explicitly optional, straight forward, and not a breaking change, of-course a constructor could be added, w/ potentialy XML attributes so that it can be used from resources, but for now I don't think it's necessary. I've also cleaned up `MainActivity` in the example app, moved the example html to a string resource, and added `setRemoveFromHtmlSpace` as an example. The `activity_main` layout now also has a slightly darker background from the `HtmlTextView` so that you can clearly see the bounds w/o using developer options "show layout bounds"