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

Commit a10c1ceb authored by Yinglei Wang's avatar Yinglei Wang Committed by Android (Google) Code Review
Browse files

Merge "Change radio button's default state description to "selected", "not selected""

parents 1e2b8593 893b7d62
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -16,10 +16,13 @@

package android.widget;

import android.annotation.NonNull;
import android.content.Context;
import android.util.AttributeSet;
import android.view.accessibility.AccessibilityNodeInfo;

import com.android.internal.R;


/**
 * <p>
@@ -98,4 +101,15 @@ public class RadioButton extends CompoundButton {
            }
        }
    }

    /** @hide **/
    @Override
    @NonNull
    protected CharSequence getButtonStateDescription() {
        if (isChecked()) {
            return getResources().getString(R.string.selected);
        } else {
            return getResources().getString(R.string.not_selected);
        }
    }
}
+6 −2
Original line number Diff line number Diff line
@@ -3056,10 +3056,14 @@
    <!-- Default text for a button that can be toggled on and off. -->
    <string name="capital_off">OFF</string>

    <!-- Default state for CompoundButton for on and off. [CHAR LIMIT=32] -->
    <!-- Default checked text used by accessibility for a button that can be checked or unchecked. [CHAR LIMIT=NONE] -->
    <string name="checked">checked</string>
    <!-- Default text for a button that can be toggled on and off. [CHAR LIMIT=32] -->
    <!-- Default not checked text used by accessibility for a button that can be checked or unchecked. [CHAR LIMIT=NONE] -->
    <string name="not_checked">not checked</string>
    <!-- Default selected text used by accessibility for an element that can be selected or unselected. [CHAR LIMIT=NONE] -->
    <string name="selected">selected</string>
    <!-- Default not selected text used by accessibility for an element that can be selected or unselected. [CHAR LIMIT=NONE] -->
    <string name="not_selected">not selected</string>

    <!-- Title of intent resolver dialog when selecting an application to run. -->
    <string name="whichApplication">Complete action using</string>
+2 −0
Original line number Diff line number Diff line
@@ -826,6 +826,7 @@
  <java-symbol type="string" name="no_file_chosen" />
  <java-symbol type="string" name="no_matches" />
  <java-symbol type="string" name="noon" />
  <java-symbol type="string" name="not_selected" />
  <java-symbol type="string" name="number_picker_increment_scroll_action" />
  <java-symbol type="string" name="number_picker_increment_scroll_mode" />
  <java-symbol type="string" name="old_app_action" />
@@ -959,6 +960,7 @@
  <java-symbol type="string" name="save_password_never" />
  <java-symbol type="string" name="save_password_notnow" />
  <java-symbol type="string" name="save_password_remember" />
  <java-symbol type="string" name="selected" />
  <java-symbol type="string" name="sendText" />
  <java-symbol type="string" name="sending" />
  <java-symbol type="string" name="serviceClassData" />