import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ActivityChooserModel.ActivityChooserModelClient;
/**
mExpandActivityOverflowButton = (FrameLayout) findViewById(R.id.expand_activities_button);
mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
+ mExpandActivityOverflowButton.setAccessibilityDelegate(new AccessibilityDelegate() {
+ @Override
+ public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(host, info);
+ info.setOpensPopup(true);
+ }
+ });
mExpandActivityOverflowButtonImage =
(ImageView) mExpandActivityOverflowButton.findViewById(R.id.image);
mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable);
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfo(info);
info.setClassName(Spinner.class.getName());
+
+ if (mAdapter != null) {
+ info.setOpensPopup(true);
+ }
}
/**
info.addAction(AccessibilityNodeInfo.ACTION_CUT);
}
}
+
+ if (!isSingleLine()) {
+ info.setMultiLine(true);
+ }
}
@Override
import android.view.View;
import android.view.ViewConfiguration;
import android.view.View.MeasureSpec;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.view.ViewGroup;
import android.widget.ImageButton;
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ info.setOpensPopup(true);
+ }
}
private class OverflowPopup extends MenuPopupHelper {
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;
}
return mInflater;
}
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+
+ if (mItemData != null && mItemData.hasSubMenu()) {
+ info.setOpensPopup(true);
+ }
+ }
}