Announce for accessiblity when taskbar is invoked/closed
Test: Manual Bug: 265620540 Change-Id: I6660be7716ec59c765f3d54f8fe9889eaaf56e10
This commit is contained in:
@@ -29,6 +29,7 @@ import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -78,6 +79,12 @@ public class IconButtonView extends BubbleTextView {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
|
||||
super.onPopulateAccessibilityEvent(event);
|
||||
event.getText().add(this.getContentDescription());
|
||||
}
|
||||
|
||||
/** Sets given Drawable as icon */
|
||||
public void setIconDrawable(@NonNull Drawable drawable) {
|
||||
ColorStateList tintList = getBackgroundTintList();
|
||||
|
||||
Reference in New Issue
Block a user