Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7673c600 authored by Mark Harman's avatar Mark Harman
Browse files

Google Play pre-launch accessibility warnings - use COMPLEX_UNIT_SP not COMPLEX_UNIT_DIP for text.

parent c3a214ad
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ UPDATED Drop support for notifications for background saving, due to Android 13
UPDATED No longer allow a screenshot of the camera preview to show in "recent apps" view (for
        Android 13+).
UPDATED No longer cancel panorama when moving device orientation too far in wrong direction.
UPDATED Made more text scale according to user's font size preference.

Version 1.51.1 (2023/01/02)

+8 −8
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ public class PopupView extends LinearLayout {
                // don't show auto-stabilise checkbox on popup if there's an on-screen icon
                CheckBox checkBox = new CheckBox(main_activity);
                checkBox.setText(getResources().getString(R.string.preference_auto_stabilise));
                checkBox.setTextSize(TypedValue.COMPLEX_UNIT_DIP, standard_text_size_dip);
                checkBox.setTextSize(TypedValue.COMPLEX_UNIT_SP, standard_text_size_dip);
                checkBox.setTextColor(Color.WHITE);
                {
                    // align the checkbox a bit better
@@ -1451,7 +1451,7 @@ public class PopupView extends LinearLayout {
                    ll2.addView(view);

                    button.setText(button_string);
                    button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, button_text_size_dip);
                    button.setTextSize(TypedValue.COMPLEX_UNIT_SP, button_text_size_dip);
                    button.setTextColor(Color.WHITE);
                    // need 0 padding so we have enough room to display text for ISO buttons, when there are 6 ISO settings
                    final int padding = (int) (0 * scale + 0.5f); // convert dps to pixels
@@ -1548,7 +1548,7 @@ public class PopupView extends LinearLayout {
        final TextView text_view = view.findViewById(R.id.text_view);

        text_view.setText(title + ":");
        text_view.setTextSize(TypedValue.COMPLEX_UNIT_DIP, title_text_size_dip);
        text_view.setTextSize(TypedValue.COMPLEX_UNIT_SP, title_text_size_dip);
        text_view.setTypeface(null, Typeface.BOLD);
        //text_view.setBackgroundColor(Color.GRAY); // debug
        this.addView(text_view);
@@ -1601,7 +1601,7 @@ public class PopupView extends LinearLayout {
            button.setBackgroundColor(Color.TRANSPARENT); // workaround for Android 6 crash!
            button.setText(title + "...");
            button.setAllCaps(false);
            button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, title_text_size_dip);
            button.setTextSize(TypedValue.COMPLEX_UNIT_SP, title_text_size_dip);
            this.addView(button);
            if( MyDebug.LOG )
                Log.d(TAG, "addRadioOptionsToPopup time 1: " + (System.nanoTime() - debug_time));
@@ -1704,7 +1704,7 @@ public class PopupView extends LinearLayout {
            button.setId(count);

            button.setText(supported_option_entry);
            button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, standard_text_size_dip);
            button.setTextSize(TypedValue.COMPLEX_UNIT_SP, standard_text_size_dip);
            button.setTextColor(Color.WHITE);
            if( MyDebug.LOG )
                Log.d(TAG, "addRadioOptionsToGroup time 3: " + (System.nanoTime() - debug_time));
@@ -1798,7 +1798,7 @@ public class PopupView extends LinearLayout {

            setArrayOptionsText(supported_options, title, text_view, title_in_options, title_in_options_first_only, current_index);
            //text_view.setBackgroundColor(Color.GRAY); // debug
            text_view.setTextSize(TypedValue.COMPLEX_UNIT_DIP, standard_text_size_dip);
            text_view.setTextSize(TypedValue.COMPLEX_UNIT_SP, standard_text_size_dip);
            text_view.setSingleLine(true); // if text too long for the button, we'd rather not have wordwrap, even if it means cutting some text off
            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f);
            // Yuck! We want the arrow_button_w to be fairly large so that users can touch the arrow buttons easily, but if
@@ -1813,7 +1813,7 @@ public class PopupView extends LinearLayout {
            prev_button.setBackgroundColor(Color.TRANSPARENT); // workaround for Android 6 crash!
            //ll2.addView(prev_button);
            prev_button.setText("<");
            prev_button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, arrow_text_size_dip);
            prev_button.setTextSize(TypedValue.COMPLEX_UNIT_SP, arrow_text_size_dip);
            prev_button.setTypeface(null, Typeface.BOLD);
            prev_button.setPadding(padding, padding, padding, padding);
            ViewGroup.LayoutParams vg_params = prev_button.getLayoutParams();
@@ -1830,7 +1830,7 @@ public class PopupView extends LinearLayout {
            next_button.setBackgroundColor(Color.TRANSPARENT); // workaround for Android 6 crash!
            //ll2.addView(next_button);
            next_button.setText(">");
            next_button.setTextSize(TypedValue.COMPLEX_UNIT_DIP, arrow_text_size_dip);
            next_button.setTextSize(TypedValue.COMPLEX_UNIT_SP, arrow_text_size_dip);
            next_button.setTypeface(null, Typeface.BOLD);
            next_button.setPadding(padding, padding, padding, padding);
            vg_params = next_button.getLayoutParams();