List of usage examples for android.view.accessibility AccessibilityNodeInfo setClassName
public void setClassName(CharSequence className)
From source file:android.support.v7.widget.SwitchCompat.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { if (Build.VERSION.SDK_INT >= 14) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(ACCESSIBILITY_EVENT_CLASS_NAME); CharSequence switchText = isChecked() ? mTextOn : mTextOff; if (!TextUtils.isEmpty(switchText)) { CharSequence oldText = info.getText(); if (TextUtils.isEmpty(oldText)) { info.setText(switchText); } else { StringBuilder newText = new StringBuilder(); newText.append(oldText).append(' ').append(switchText); info.setText(newText);/* w w w .j av a 2 s .c o m*/ } } } }
From source file:io.doist.datetimepicker.time.TimePickerClockDelegate.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { info.setClassName(TimePicker.class.getName()); }
From source file:org.mariotaku.multivalueswitch.library.MultiValueSwitch.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(ACCESSIBILITY_EVENT_CLASS_NAME); CharSequence switchText = getEntry(getCheckedPosition()); if (!TextUtils.isEmpty(switchText)) { CharSequence oldText = info.getText(); if (TextUtils.isEmpty(oldText)) { info.setText(switchText); } else { StringBuilder newText = new StringBuilder(); newText.append(oldText).append(' ').append(switchText); info.setText(newText);// ww w.jav a 2 s . c o m } } } }
From source file:com.mixiaoxiao.support.widget.SmoothSwitch.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { if (Build.VERSION.SDK_INT >= 14) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(SmoothSwitch.class.getName()); CharSequence switchText = isChecked() ? mTextOn : mTextOff; if (!TextUtils.isEmpty(switchText)) { CharSequence oldText = info.getText(); if (TextUtils.isEmpty(oldText)) { info.setText(switchText); } else { StringBuilder newText = new StringBuilder(); newText.append(oldText).append(' ').append(switchText); info.setText(newText);//from w w w.ja v a 2 s. c o m } } } }
From source file:android.widget.Gallery.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(Gallery.class.getName()); info.setScrollable(mItemCount > 1); if (isEnabled()) { if (mItemCount > 0 && mSelectedPosition < mItemCount - 1) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); }//from w ww .j av a 2s . c o m if (isEnabled() && mItemCount > 0 && mSelectedPosition > 0) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); } } }
From source file:com.albedinsky.android.ui.widget.BaseProgressBar.java
/** *//*from w ww . ja va 2 s . c o m*/ @Override @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public void onInitializeAccessibilityNodeInfo(@NonNull AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(BaseProgressBar.class.getName()); }
From source file:com.albedinsky.android.support.ui.widget.BaseProgressBar.java
/** *//*from w ww . j a va 2 s .c o m*/ @Override public void onInitializeAccessibilityNodeInfo(@NonNull AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(BaseProgressBar.class.getName()); }
From source file:cm.aptoide.com.actionbarsherlock.widget.SearchView.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(SearchView.class.getName()); }
From source file:android.support.v7.widget.LinearLayoutCompat.java
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { if (Build.VERSION.SDK_INT >= 14) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(LinearLayoutCompat.class.getName()); }//from ww w .ja v a 2s .c om }
From source file:cnedu.ustcjd.widget.MultiSlider.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(MultiSlider.class.getName()); }