mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Hide clear-all button from accessibility
This solves muliple navigation problems in Overview. Bug: 79165501 Change-Id: I2ae99fe3ad24194c9516bb2a99344289ef7408e8 Testing: Manual
This commit is contained in:
@@ -11,4 +11,5 @@
|
||||
android:textColor="?attr/workspaceTextColor"
|
||||
android:visibility="invisible"
|
||||
android:textSize="14sp"
|
||||
android:importantForAccessibility="no"
|
||||
/>
|
||||
@@ -22,7 +22,6 @@ import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.widget.Button;
|
||||
|
||||
public class ClearAllButton extends Button {
|
||||
@@ -36,14 +35,6 @@ public class ClearAllButton extends Button {
|
||||
mRecentsView = recentsView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
|
||||
super.onInitializeAccessibilityNodeInfo(info);
|
||||
// Should be visible to accessibility even when completely covered by the task.
|
||||
// Otherwise, we won't be able to scroll to it.
|
||||
info.setVisibleToUser(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performAccessibilityAction(int action, Bundle arguments) {
|
||||
final boolean res = super.performAccessibilityAction(action, arguments);
|
||||
|
||||
@@ -1303,8 +1303,6 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
|
||||
|
||||
private void onChildViewsChanged() {
|
||||
final int childCount = getChildCount();
|
||||
mClearAllButton.setAccessibilityTraversalAfter(
|
||||
childCount == 0 ? NO_ID : getChildAt(childCount - 1).getId());
|
||||
mClearAllButton.setVisibility(childCount == 0 ? INVISIBLE : VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user