Filled navigationContentDescription field in toolbars.

This commit is contained in:
Igor B. Poretsky 2016-03-31 23:09:02 +03:00
parent 0ceb244730
commit db6df0c349
9 changed files with 10 additions and 0 deletions

View file

@ -1987,4 +1987,5 @@
<string name="storage_directory_readonly_desc">Папка, выбранная для хранения данных, доступна только для чтения. Вместо нее временно будет использоваться внутренняя память. Пожалуйста, выберите подходящее хранилище.</string>
<string name="storage_directory_shared">Разделяемая память</string>
<string name="access_sort">Сортировать</string>
<string name="access_shared_string_navigate_up">Перейти вверх</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_shared_string_navigate_up">Navigate up</string>
<string name="access_sort">Sort</string>
<string name="map_mode">Map mode</string>
<string name="number_of_gpx_files_selected_pattern">%s GPX files selected</string>

View file

@ -45,6 +45,7 @@ public abstract class ActionBarPreferenceActivity extends AppCompatPreferenceAct
}
tb.setClickable(true);
tb.setNavigationIcon(((OsmandApplication) getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
tb.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
tb.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));
tb.setNavigationOnClickListener(new View.OnClickListener() {

View file

@ -79,6 +79,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -78,6 +78,7 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -84,6 +84,7 @@ public abstract class PointEditorFragment extends Fragment {
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setTitle(getToolbarTitle());
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setTitleTextColor(getResources().getColor(getResIdFromAttribute(getMapActivity(), R.attr.pstsTextColor)));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override

View file

@ -133,6 +133,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setTitle(isAddingPoi ? R.string.poi_create_title : R.string.poi_edit_title);
toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -714,6 +714,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
tb.setClickable(true);
Drawable back = ((OsmandApplication) getApplication()).getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
tb.setNavigationIcon(back);
tb.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
tb.setTitle(R.string.osmo_sign_in);
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
tb.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));

View file

@ -350,6 +350,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
topBar.setClickable(true);
Drawable back = app.getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
topBar.setNavigationIcon(back);
topBar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
topBar.setTitle(title);
topBar.setBackgroundColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTabBackground)));
topBar.setTitleTextColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTextColor)));
@ -432,6 +433,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
topBar.setClickable(true);
Drawable back = app.getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
topBar.setNavigationIcon(back);
topBar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
topBar.setTitle(title);
topBar.setBackgroundColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTabBackground)));
topBar.setTitleTextColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTextColor)));