Fix background and line wrapping in CaptionTextView

Also fixes where two style names were accidentally switched,
makes the font sizes larger, and cleans up the CaptionTextView
styling APIs in preparation for moving it into the framework.

BUG: 10396663
Change-Id: I00999723a67bce2659d913b70dd4420ed32f955c
This commit is contained in:
Alan Viverette
2013-08-20 15:58:38 -07:00
parent c7679b0ef2
commit c30f124c91
5 changed files with 315 additions and 249 deletions

View File

@@ -86,10 +86,13 @@ public class ToggleCaptioningPreferenceFragment extends Fragment {
}
public static void applyCaptionProperties(CaptioningTextView previewText, int styleId) {
previewText.applyStyleAndFontSize(styleId);
previewText.setStyle(styleId);
final Context context = previewText.getContext();
final ContentResolver cr = context.getContentResolver();
final float fontSize = CaptioningManager.getFontSize(cr);
previewText.setTextSize(fontSize);
final Locale locale = CaptioningManager.getLocale(cr);
if (locale != null) {
final CharSequence localizedText = AccessibilityUtils.getTextForLocale(