Unfortunately this is not possible in Android.
In Android the Views
(also the TextView
) can have almost anything as a background not just a color (a bitmap, a shape, a gradient color, etc). Because of this there is no way to get the background color of a view (it is not stored).
This is not a limitation of Calabash but the Android system. You can get any property of an Android view if it is accessible.
You can query the following colors on the TextView (nothing is background):
- text color
:currentTextColor
- hintTextColor
:hintTextColor
- highlight color
:highlightColor
- shadow color
:shadowColor