- // Set the display options for the font size TextView.
- if (fontSizeArrayPosition == 0) { // System default font size is selected. Display `fontSizeTextView`.
- fontSizeTextView.setVisibility(View.VISIBLE);
- } else { // A custom font size is specified. Hide `fontSizeTextView`.
- fontSizeTextView.setVisibility(View.GONE);
+ // Hide the custom font size edit text.
+ customFontSizeEditText.setVisibility(View.GONE);
+
+ // Set the default font size as the text of the custom font size edit text. This way, if the user switches to custom it will already be populated.
+ customFontSizeEditText.setText(defaultFontSizeString);
+ } else { // A custom font size is selected.
+ // Set the spinner to the custom font size.
+ fontSizeSpinner.setSelection(1);
+
+ // Hide the default font size text view.
+ defaultFontSizeTextView.setVisibility(View.GONE);
+
+ // Show the custom font size edit text.
+ customFontSizeEditText.setVisibility(View.GONE);
+
+ // Set the custom font size.
+ customFontSizeEditText.setText(String.valueOf(fontSizeInt));