Closed igorlb-yt closed 3 years ago
Hi. There are two sources of information, which influence what we see in Developer Assistant:
A given android View needs to implement View.onProvideStructure(ViewStructure) method. Native Views do that for us, but sometimes in a different way than we would imagine;) The plain android.widget.Button I checked on random Android API version, doesn't use backgroundTint color to fill the test background color via the ViewStructure.setTextStyle method. The TextView being a superclass of the Button also doesn't do so. The only think I can suggest, is to extend View.onProvideStructure method of your custom View class and fill according your needs, for example to provide backgroundTint to the ViewStructure.setTextStyle method as a text background.
A second source of information is way to complicated to even start a discussion here ;) there is a lot of heuristics implemented which cross-check information provided by views to the ViewStructure described above, with resources and layouts from the inspected application, to match as much extra information as possible. I'm improving these algorithms over time, but they won't be perfect. They are just the "best effort", as there is no any official API to do more.
I hope I could help a bit. Please notify me if I can close issue or do something more for you.
The application is detecting the textColor of the button text, but does not detect the backgroungTint