Here's an attempt at supporting both maxlines and width/height (as determined by the view layout system) using a StaticLayout.
Like the previous version, this fails if the line spacing multiplier and addition are set to anything other than 1.0 and 0.0. (The constructor does not use the setter and the getters weren't added until API 16, so retrieving the initial values in a supported fashion is "impossible".)
This works for me, but isn't heavily tested. And you may have some other ideas about how to handle height.
Here's an attempt at supporting both maxlines and width/height (as determined by the view layout system) using a StaticLayout.
Like the previous version, this fails if the line spacing multiplier and addition are set to anything other than 1.0 and 0.0. (The constructor does not use the setter and the getters weren't added until API 16, so retrieving the initial values in a supported fashion is "impossible".)
This works for me, but isn't heavily tested. And you may have some other ideas about how to handle height.