Set caption preview font size in dips

Change-Id: I9844b6f927b557b46f23c6211b5be47647002ab8
This commit is contained in:
Alan Viverette
2014-02-17 13:34:37 -08:00
parent b05f1d0081
commit bc02ced9fb
2 changed files with 7 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ import com.android.internal.widget.SubtitleView;
import com.android.settings.R;
public class PresetPreference extends ListDialogPreference {
private static final float DEFAULT_FONT_SIZE = 96f;
private static final float DEFAULT_FONT_SIZE = 32f;
private final CaptioningManager mCaptioningManager;
@@ -54,7 +54,8 @@ public class PresetPreference extends ListDialogPreference {
CaptionPropertiesFragment.applyCaptionProperties(
mCaptioningManager, previewText, value);
previewText.setTextSize(DEFAULT_FONT_SIZE);
final float density = getContext().getResources().getDisplayMetrics().density;
previewText.setTextSize(DEFAULT_FONT_SIZE * density);
final CharSequence title = getTitleAt(index);
if (title != null) {