From cb5b661e59cef5c7ef950a8f392f69067cf39bb1 Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Thu, 31 Mar 2016 23:18:36 +0300 Subject: [PATCH] Contextually filled contentDescription field of the collapsible widgets. --- OsmAnd/res/values-ru/strings.xml | 1 + OsmAnd/res/values/strings.xml | 1 + OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java | 1 + OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index f40ad210ab..70b4884ef9 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -1988,4 +1988,5 @@ Разделяемая память Сортировать Перейти вверх + Развернуть diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 0b8e1a746b..78123ab481 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -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 --> + Expand Navigate up Sort Map mode diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index e8c7de43fb..0581b81a8d 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -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()); diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java index 053e4ca5bd..921b1e63ff 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java @@ -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; } -} \ No newline at end of file +}