View Single Post
Old 03-23-2013, 02:03 PM   #43
stevov
Groupie
stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.stevov ought to be getting tired of karma fortunes by now.
 
stevov's Avatar
 
Posts: 172
Karma: 805314
Join Date: Dec 2012
Location: East Ayrshire, Scotland
Device: Asus Fonepad,kobo arc,htc onex, htc titan
Quote:
Originally Posted by slate View Post
For those curious as to why the ui is not in tablet mode here's the reason:

In the android source code for 4.1.1 in the file
Code:
/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
you have the method setInitialDisplaySize()

within this method you'll find the following code:

Code:
// SystemUI (status bar) layout policy
int shortSizeDp = shortSize
        * DisplayMetrics.DENSITY_DEFAULT
        / DisplayMetrics.DENSITY_DEVICE;

if (shortSizeDp < 600) {
    // 0-599dp: "phone" UI with a separate status & navigation bar
    mHasSystemNavBar = false;
    mNavigationBarCanMove = true;
} else if (shortSizeDp < 720) {
    // 600-719dp: "phone" UI with modifications for larger screens
    mHasSystemNavBar = false;
    mNavigationBarCanMove = false;
} else {
    // 720dp: "tablet" UI with a single combined status & navigation bar
    mHasSystemNavBar = true;
    mNavigationBarCanMove = false;
}
This will determine the type of ui to display.

The arc lcd density is set to a default of 213.
DisplayMetrics.DENSITY_DEFAULT is set to a default of 160.
size of kobo arc screen is 1280x800 so shortsize is 800.

So we do the calculation:

800 * 160 / 213 = 600.9

600.9 gives us "phone" UI with modifications for larger screens

I find this default phone ui a very glaring omission during the testing phase. A few more changes will need to be done if kobo truly wants a tablet ui on a tablet device but it's honestly not hard to implement.
Dear Kobo would you please give this man a job as he seems to know more than the ones you have working for you.
stevov is offline   Reply With Quote