Loading core/java/android/widget/RadioButton.java +14 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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); } } } core/res/res/values/strings.xml +6 −2 Original line number Diff line number Diff line Loading @@ -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> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -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" /> Loading Loading @@ -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" /> Loading Loading
core/java/android/widget/RadioButton.java +14 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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); } } }
core/res/res/values/strings.xml +6 −2 Original line number Diff line number Diff line Loading @@ -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> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -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" /> Loading Loading @@ -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" /> Loading