Skip to content

Commit

Permalink
Fixed sizing on smaller devices
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjluc committed Feb 8, 2015
1 parent c92f822 commit a53e5bb
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ public View getView(final int pos, View convertView, ViewGroup parent) {
holder.textView.setText("" + n.getLetter());
holder.textView.setHeight(mColumnWidth);
int size;
int difference = ((WordSearchManager.ADVANCED_MAX_WORDLENGTH + WordSearchManager.ADVANCED_MAX_DIMENSION_OFFSET - WordSearchManager.EASY_MIN_WORDLENGTH) / 3);
int difference = ((WordSearchManager.ADVANCED_MAX_WORDLENGTH + WordSearchManager.ADVANCED_MAX_DIMENSION_OFFSET - WordSearchManager.EASY_MIN_WORDLENGTH) / 5);
if (WordSearchManager.EASY_MIN_WORDLENGTH <= mWordSearchDimension && mWordSearchDimension < (WordSearchManager.EASY_MIN_WORDLENGTH + difference))
size = 32;
size = 36;
else if ((WordSearchManager.EASY_MIN_WORDLENGTH + difference) <= mWordSearchDimension && mWordSearchDimension < (WordSearchManager.EASY_MIN_WORDLENGTH + difference * 2))
size = 32;
else if ((WordSearchManager.EASY_MIN_WORDLENGTH + difference * 2) <= mWordSearchDimension && mWordSearchDimension < (WordSearchManager.EASY_MIN_WORDLENGTH + difference * 3))
size = 28;
else if ((WordSearchManager.EASY_MIN_WORDLENGTH + difference * 3) <= mWordSearchDimension && mWordSearchDimension < (WordSearchManager.EASY_MIN_WORDLENGTH + difference * 4))
size = 24;
else
size = 22;
size = 20;

if (mIsTablet)
size *= 1.5;
Expand Down

0 comments on commit a53e5bb

Please sign in to comment.