SHARE
TWEET

Untitled

a guest Aug 8th, 2013 357 Never
  1. /**
  2.  * Returns number of cells needed for given size of the widget.
  3.  *
  4.  * @param size Widget size in dp.
  5.  * @return Size in number of cells.
  6.  */
  7. private static int getCellsForSize(int size) {
  8.         int n = 2;
  9.         while (70 * n - 30 < size) {
  10.                 ++n;
  11.         }
  12.         return n - 1;
  13. }
RAW Paste Data
Top