summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-06-26 14:49:18 -0400
committerSelim Cinek <cinek@google.com>2015-06-30 19:38:26 -0700
commit4949c75f1e891e165b63db17c487cf2383bcfcd4 (patch)
treee4fafb25af1cf9ee64e0d0ec2d424e15a4ecb8bf /packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
parent4e6b2d3e7d2c78c0575c14045469c36ab09a6a4e (diff)
downloadframeworks_base-4949c75f1e891e165b63db17c487cf2383bcfcd4.zip
frameworks_base-4949c75f1e891e165b63db17c487cf2383bcfcd4.tar.gz
frameworks_base-4949c75f1e891e165b63db17c487cf2383bcfcd4.tar.bz2
Fixed accessibility order for quick settings
Bug: 20535538 Change-Id: I4e464c54158eb575208f6361af295ae702b19b21
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java b/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
index a0a5561..8829794 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/ToggleSeekBar.java
@@ -19,9 +19,13 @@ package com.android.systemui.settings;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.SeekBar;
public class ToggleSeekBar extends SeekBar {
+ private String mAccessibilityLabel;
+
public ToggleSeekBar(Context context) {
super(context);
}
@@ -42,4 +46,16 @@ public class ToggleSeekBar extends SeekBar {
return super.onTouchEvent(event);
}
+
+ public void setAccessibilityLabel(String label) {
+ mAccessibilityLabel = label;
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ if (mAccessibilityLabel != null) {
+ info.setText(mAccessibilityLabel);
+ }
+ }
}