You can instantiate a number of Fragments based on the dimension of the text, measured via public float measureText (String text)
. Then you determine the screen as stated in Get screen dimensions in pixels
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
And this way you can calculate the number of fragments you need.
For the splitting part the quickest solution I can think of would be a loop with measureText (String text, int start, int end)
to determine where the text has to be split. (There might be more elegant solutions to this)