當前位置: 首頁>>代碼示例>>Java>>正文


Java View.announceForAccessibility方法代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:11,代碼來源:Utils.java

示例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);
    }
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:13,代碼來源:Utils.java

示例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()));
}
 
開發者ID:michelelacorte,項目名稱:FlickLauncher,代碼行數:14,代碼來源:WallpaperPickerActivity.java

示例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()));
}
 
開發者ID:TeamBrainStorm,項目名稱:SimpleUILauncher,代碼行數:14,代碼來源:WallpaperPickerActivity.java

示例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);
    }
}
 
開發者ID:ttpho,項目名稱:TimePicker,代碼行數:11,代碼來源:Utils.java

示例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);
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:7,代碼來源:Utils.java


注:本文中的android.view.View.announceForAccessibility方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。