Appwidget size calculation

后端 未结 4 731
说谎
说谎 2020-12-12 17:34

It might be me, but when I calculate minimum app widget sizes according to the formula given on the android page I don\'t get the right widget widths; The formula is as foll

4条回答
  •  感情败类
    2020-12-12 18:11

    Not too many devices fully follow Google's advised formula. You're better off using several xml-xxx folders that can specify more accurate minWidth & minHeight that correspond to the varying screens & OSes.

    Right now I four solely based on OS:

    xml       // standard
    xml-v11   // Honeycomb grid
    xml-v14    // ICS's new extra padding
    xml-sw552dp-v14  // ICS tablet padding
    

    But as I fine tune, I may have to add a few new folders for particular dpis or screens.

    Quick update:

    Only some devices use automatic padding. Samsung & HTC have custom UIs that use full-width widgets, so they override the OS padding on their launchers.

提交回复
热议问题