closeDrawerContentDescRes

closeDrawerContentDescRes

本文介绍了何时执行“ ActionBarDrawerToggle”显示其“ openDrawerContentDescRes”;和“ closeDrawerContentDescRes”;琴弦?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ActionBarDrawerToggle的CTOR如下:

The CTOR of "ActionBarDrawerToggle" is as such:

public ActionBarDrawerToggle (Activity activity, DrawerLayout drawerLayout, int openDrawerContentDescRes, int closeDrawerContentDescRes)

or:

public ActionBarDrawerToggle (Activity activity, DrawerLayout drawerLayout, Toolbar toolbar, int openDrawerContentDescRes, int closeDrawerContentDescRes)

文档告诉您有关字符串参数的信息,即():

The documentation tells you about the strings parameters, that (here ) :



问题



我找不到使用这些字符串的情况。

The problem

I can't find a scenario that those strings are being used.

与操作项不同,每次单击项目时我都可以看到一个土司,在这种情况下我找不到它。

As opposed to action items, where I can see a toast each time I long click an item, here I couldn't find in which case I can see it.

为什么需要?在什么情况下显示?

Why is it required? In which cases is it shown?

ImageView发生了什么吗?如果是这样,我还是想知道何时使用这些字符串以及如何使用它们(在ImageView和此处)。

Is it like what's happening to ImageView ? If so, I'd still like to know when those strings are used and how (on both ImageView and here).

推荐答案

这些是用于内容描述的字符串资源。它们不会显示在屏幕上,但是可访问性服务可以使用它们来例如大声说出那些使用文本语音转换的视障用户的内容。这样,您可以使设备在抽屉打开或关闭时发出抽屉打开或抽屉关闭(或其他字符串)的声音,以便盲人知道应用程序中发生了什么。

Those are string resources for content descriptions. They are not displayed on screen, but accessibility services can use them to, for example, say aloud what the content is for users who are visually impaired using text-to-speech. That way you could have the device produce audio saying "drawer open" or "drawer closed" (or any other strings) when the drawer opens or closes, so blind users know what happened in the app.

这篇关于何时执行“ ActionBarDrawerToggle”显示其“ openDrawerContentDescRes”;和“ closeDrawerContentDescRes”;琴弦?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 21:25