Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ExposedDropdownMenu] Added support for default/ripple background col…
…ors for the selected item of the exposed dropdown menu when the default MaterialAutoCompleteArrayAdapter is being used. PiperOrigin-RevId: 447531152
- Loading branch information
1 parent
3fc53ac
commit 6206ff5
Showing
12 changed files
with
278 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-25.4 KB
(46%)
docs/components/assets/menu/menus_exposed_dropdown_outlined.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-46.9 KB
docs/components/assets/textfields/textfields_exposed_dropdown_menu.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
lib/java/com/google/android/material/textfield/res/color/m3_simple_item_ripple_color.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2022 The Android Open Source Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:alpha="@dimen/m3_ripple_pressed_alpha" android:color="?attr/colorOnSurface" android:state_pressed="true"/> | ||
<!-- The selected and hovered colors should also specify that they are for android:state_pressed="false". --> | ||
<!-- When focused, the dropdown's item text view doesn't respond to state_focused, but to state_selected instead. --> | ||
<item android:alpha="@dimen/m3_simple_item_color_selected_alpha" android:color="?attr/colorOnSurface" android:state_selected="true" android:state_pressed="false"/> | ||
<item android:alpha="@dimen/m3_simple_item_color_hovered_alpha" android:color="?attr/colorOnSurface" android:state_hovered="true" android:state_pressed="false"/> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.