|
64 | 64 | import androidx.core.view.PointerIconCompat; |
65 | 65 | import androidx.core.view.ViewCompat; |
66 | 66 | import androidx.core.widget.TextViewCompat; |
67 | | -import androidx.appcompat.app.ActionBar; |
68 | 67 | import androidx.appcompat.content.res.AppCompatResources; |
69 | 68 | import androidx.appcompat.widget.TooltipCompat; |
70 | 69 | import android.text.Layout; |
@@ -198,6 +197,8 @@ public class TabLayout extends HorizontalScrollView { |
198 | 197 |
|
199 | 198 | private static final Pools.Pool<Tab> tabPool = new Pools.SynchronizedPool<>(16); |
200 | 199 |
|
| 200 | + private static final String ACCESSIBILITY_CLASS_NAME = "androidx.appcompat.app.ActionBar.Tab"; |
| 201 | + |
201 | 202 | /** |
202 | 203 | * Scrollable tabs display a subset of tabs at any given moment, and can contain longer tab labels |
203 | 204 | * and a larger number of tabs. They are best used for browsing contexts in touch interfaces when |
@@ -2341,15 +2342,15 @@ public void setSelected(final boolean selected) { |
2341 | 2342 | public void onInitializeAccessibilityEvent(@NonNull AccessibilityEvent event) { |
2342 | 2343 | super.onInitializeAccessibilityEvent(event); |
2343 | 2344 | // This view masquerades as an action bar tab. |
2344 | | - event.setClassName(ActionBar.Tab.class.getName()); |
| 2345 | + event.setClassName(ACCESSIBILITY_CLASS_NAME); |
2345 | 2346 | } |
2346 | 2347 |
|
2347 | 2348 | @TargetApi(14) |
2348 | 2349 | @Override |
2349 | 2350 | public void onInitializeAccessibilityNodeInfo(@NonNull AccessibilityNodeInfo info) { |
2350 | 2351 | super.onInitializeAccessibilityNodeInfo(info); |
2351 | 2352 | // This view masquerades as an action bar tab. |
2352 | | - info.setClassName(ActionBar.Tab.class.getName()); |
| 2353 | + info.setClassName(ACCESSIBILITY_CLASS_NAME); |
2353 | 2354 | if (badgeDrawable != null && badgeDrawable.isVisible()) { |
2354 | 2355 | CharSequence customContentDescription = getContentDescription(); |
2355 | 2356 | info.setContentDescription( |
|
0 commit comments