Skip to content Skip to sidebar Skip to footer

Breaking Large Text Into Pages In Android Text Switcher Or View Flipper

I am in the process of developing an e-book reader application for android 3.0 tablets. To begin with I have a large chunk of String data. I want to split/break that String into pa

Solution 1:

This is all you need to make your code work.

DisplayMetricsdm=newDisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(dm);
    intscreenWidth= dm.widthPixels;
    int screenHeight= dm.heightPixels;

Replace your following code block with mine. It will work.

Displaydisplay= getWindowManager().getDefaultDisplay(); 
intscreenWidth= display.getWidth();
intscreenHeight= display.getHeight();

Post a Comment for "Breaking Large Text Into Pages In Android Text Switcher Or View Flipper"