Contextually filled contentDescription field of the collapsible

widgets.
This commit is contained in:
Igor B. Poretsky 2016-03-31 23:18:36 +03:00
parent 1d498443a8
commit cb5b661e59
4 changed files with 5 additions and 1 deletions

View file

@ -1988,4 +1988,5 @@
<string name="storage_directory_shared">Разделяемая память</string>
<string name="access_sort">Сортировать</string>
<string name="access_shared_string_navigate_up">Перейти вверх</string>
<string name="access_widget_expand">Развернуть</string>
</resources>

View file

@ -10,6 +10,7 @@
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="access_widget_expand">Expand</string>
<string name="access_shared_string_navigate_up">Navigate up</string>
<string name="access_sort">Sort</string>
<string name="map_mode">Map mode</string>

View file

@ -298,6 +298,7 @@ public class GpxUiHelper {
iconView.setVisibility(View.INVISIBLE);
} else {
iconView.setVisibility(View.VISIBLE);
iconView.setContentDescription(activity.getString(adapter.getItemName(position).contains("\n") ? R.string.shared_string_collapse : R.string.access_widget_expand));
}
TextView tv = (TextView) v.findViewById(R.id.title);
tv.setText(item.getTitle());

View file

@ -152,6 +152,7 @@ public class MapInfoLayer extends OsmandMapLayer {
View.VISIBLE : View.GONE);
this.expand.setImageResource(expanded ? R.drawable.map_up :
R.drawable.map_down);
expand.setContentDescription(map.getString(expanded ? R.string.shared_string_collapse : R.string.access_widget_expand));
expand.setOnClickListener(new OnClickListener() {
@Override
@ -306,4 +307,4 @@ public class MapInfoLayer extends OsmandMapLayer {
}
return defValue;
}
}
}