File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
lib/java/com/google/android/material/chip Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -985,6 +985,8 @@ protected void getVisibleVirtualViews(@NonNull List<Integer> virtualViewIds) {
985985 protected void onVirtualViewKeyboardFocusChanged (int virtualViewId , boolean hasFocus ) {
986986 if (virtualViewId == CLOSE_ICON_VIRTUAL_ID ) {
987987 closeIconFocused = hasFocus ;
988+ }
989+ if (chipDrawable .refreshCloseIconFocus (closeIconFocused )) {
988990 refreshDrawableState ();
989991 }
990992 }
Original file line number Diff line number Diff line change @@ -1396,6 +1396,14 @@ public void setTextColor(@Nullable ColorStateList color) {
13961396 }
13971397 }
13981398
1399+ boolean refreshCloseIconFocus (boolean closeIconFocused ) {
1400+ boolean changed = false ;
1401+ if (closeIcon != null ) {
1402+ changed = setCloseIconState (closeIconFocused ? new int [] {android .R .attr .state_pressed , android .R .attr .state_enabled } : DEFAULT_STATE );
1403+ }
1404+ return changed ;
1405+ }
1406+
13991407 /** Delegate interface to be implemented by Views that own a ChipDrawable. */
14001408 public interface Delegate {
14011409
You can’t perform that action at this time.
0 commit comments