Skip to content

Commit

Permalink
Shrink half day label sizes for tablets to fit on one line
Browse files Browse the repository at this point in the history
  • Loading branch information
philliphsu committed Dec 18, 2016
1 parent 4b26fb8 commit c1a3aa2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ public void onClick(View v) {
mFirstHalfDayToggle.setCompoundDrawablesWithIntrinsicBounds(null, icon1, null, null);
mSecondHalfDayToggle.setCompoundDrawablesWithIntrinsicBounds(null, icon2, null, null);
}
if (res.getConfiguration().smallestScreenWidthDp >= 600/*dp units*/) {
// Shrink text size so that labels fit on one line
mFirstHalfDayToggle.setTextSize(0.5f * mFirstHalfDayToggle.getTextSize());
mSecondHalfDayToggle.setTextSize(0.5f * mSecondHalfDayToggle.getTextSize());
}
} else {
mAmPmTextView.setVisibility(View.VISIBLE);
mAmPmHitspace.setOnClickListener(new OnClickListener() {
Expand Down

0 comments on commit c1a3aa2

Please sign in to comment.