More natural way of providing top map widget accessibility

This commit is contained in:
Igor B. Poretsky 2017-01-16 22:16:36 +03:00
parent 21beefbe81
commit 1c803c3e08
3 changed files with 6 additions and 5 deletions

View file

@ -247,6 +247,7 @@
<TextView
android:id="@+id/map_address_text_shadow"
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -310,6 +311,7 @@
<TextView
android:id="@+id/waypoint_text_shadow"
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
@ -496,6 +498,7 @@
<TextView
android:id="@+id/map_lanes_dist_text_shadow"
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"

View file

@ -25,6 +25,7 @@
<TextView
android:id="@+id/map_address_text_shadow"
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -108,6 +109,7 @@
<TextView
android:id="@+id/waypoint_text_shadow"
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
@ -569,6 +571,7 @@
<TextView
android:id="@+id/map_lanes_dist_text_shadow"
android:importantForAccessibility="no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"

View file

@ -640,11 +640,6 @@ public class MapInfoWidgetsFactory {
}
}
if (!text.equals(addressText.getText().toString())) {
if (!text.equals("")) {
topBar.setContentDescription(text);
} else {
topBar.setContentDescription(map.getResources().getString(R.string.map_widget_top_text));
}
addressTextShadow.setText(text);
addressText.setText(text);
return true;