Android アプリにテキスト フィールド (EditView) があり、値が無効または空の場合に色 (境界線) が変わります。また、この場合、 label(TextView) もその色を変更します。
を使用して TextView を取得しようとするとquery
、次のように表示されます。
[0] {
"id" => "field_lable",
"enabled" => true,
"contentDescription" => nil,
"class" => "android.widget.TextView",
"text" => "Name",
"rect" => {
"center_y" => 198.5,
"center_x" => 51.0,
"height" => 27,
"y" => 185,
"width" => 82,
"x" => 10
},
"description" => "android.widget.TextView@a28btb00"
}
テキストを取得する必要がある場合は、使用できますquery("TextView id:'field_label'", :text)
ひょうたんに TextView の色を取得する方法はありますか?