I have drawn one StaticLayout on imageview and I have to write single as well as multiline text. Issue is I have to restrict the user if text crosses the horizontal boundary in case of single line and also restrict the user vertically in case of multiline text is entered.
I have tried comparing mTextLayout.getHeight() > (rect.height())
rect is the current height of the area where static layout boundary will be drawn. But getHeight() is not available for StaticLayout on docs but can be used from Layout class which is giving wrong results.
So is there any way to know when StaticLayout boundary is reached in any direction.