本文整理匯總了Java中android.view.View.announceForAccessibility方法的典型用法代碼示例。如果您正苦於以下問題:Java View.announceForAccessibility方法的具體用法?Java View.announceForAccessibility怎麽用?Java View.announceForAccessibility使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.view.View
的用法示例。
在下文中一共展示了View.announceForAccessibility方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: tryAccessibilityAnnounce
import android.view.View; //導入方法依賴的package包/類
/**
* Try to speak the specified text, for accessibility. Only available on JB or later.
* @param text Text to announce.
*/
@SuppressLint("NewApi")
public static void tryAccessibilityAnnounce(View view, CharSequence text) {
if (isJellybeanOrLater() && view != null && text != null) {
view.announceForAccessibility(text);
}
}
示例2: tryAccessibilityAnnounce
import android.view.View; //導入方法依賴的package包/類
/**
* Try to speak the specified text, for accessibility. Only available on JB
* or later.
*
* @param text Text to announce.
*/
@SuppressLint("NewApi")
public static void tryAccessibilityAnnounce(View view, CharSequence text) {
if (isJellybeanOrLater() && view != null && text != null) {
view.announceForAccessibility(text);
}
}
示例3: selectTile
import android.view.View; //導入方法依賴的package包/類
public void selectTile(View v) {
if (mSelectedTile != null) {
mSelectedTile.setSelected(false);
mSelectedTile = null;
}
mSelectedTile = v;
v.setSelected(true);
mSelectedIndex = mWallpapersView.indexOfChild(v);
// TODO: Remove this once the accessibility framework and
// services have better support for selection state.
v.announceForAccessibility(
getString(R.string.announce_selection, v.getContentDescription()));
}
示例4: selectTile
import android.view.View; //導入方法依賴的package包/類
@Thunk void selectTile(View v) {
if (mSelectedTile != null) {
mSelectedTile.setSelected(false);
mSelectedTile = null;
}
mSelectedTile = v;
v.setSelected(true);
mSelectedIndex = mWallpapersView.indexOfChild(v);
// TODO: Remove this once the accessibility framework and
// services have better support for selection state.
v.announceForAccessibility(
getContext().getString(R.string.announce_selection, v.getContentDescription()));
}
示例5: tryAccessibilityAnnounce
import android.view.View; //導入方法依賴的package包/類
/**
* Try to speak the specified text, for accessibility. Only available on JB or later.
*
* @param text Text to announce.
*/
public static void tryAccessibilityAnnounce(View view, CharSequence text) {
if (view != null && text != null) {
view.announceForAccessibility(text);
}
}
示例6: tryAccessibilityAnnounce
import android.view.View; //導入方法依賴的package包/類
@SuppressLint({"NewApi"})
public static void tryAccessibilityAnnounce(View view, CharSequence text) {
if (isJellybeanOrLater() && view != null && text != null) {
view.announceForAccessibility(text);
}
}