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


Java AccessibilityNodeInfoCompat.setSelected方法代碼示例

本文整理匯總了Java中android.support.v4.view.accessibility.AccessibilityNodeInfoCompat.setSelected方法的典型用法代碼示例。如果您正苦於以下問題:Java AccessibilityNodeInfoCompat.setSelected方法的具體用法?Java AccessibilityNodeInfoCompat.setSelected怎麽用?Java AccessibilityNodeInfoCompat.setSelected使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v4.view.accessibility.AccessibilityNodeInfoCompat的用法示例。


在下文中一共展示了AccessibilityNodeInfoCompat.setSelected方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: copyNodeInfoNoChildren

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
private void copyNodeInfoNoChildren(AccessibilityNodeInfoCompat dest, AccessibilityNodeInfoCompat src) {
    Rect rect = this.mTmpRect;
    src.getBoundsInParent(rect);
    dest.setBoundsInParent(rect);
    src.getBoundsInScreen(rect);
    dest.setBoundsInScreen(rect);
    dest.setVisibleToUser(src.isVisibleToUser());
    dest.setPackageName(src.getPackageName());
    dest.setClassName(src.getClassName());
    dest.setContentDescription(src.getContentDescription());
    dest.setEnabled(src.isEnabled());
    dest.setClickable(src.isClickable());
    dest.setFocusable(src.isFocusable());
    dest.setFocused(src.isFocused());
    dest.setAccessibilityFocused(src.isAccessibilityFocused());
    dest.setSelected(src.isSelected());
    dest.setLongClickable(src.isLongClickable());
    dest.addAction(src.getActions());
    dest.setMovementGranularities(src.getMovementGranularities());
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:21,代碼來源:SlidingPaneLayout.java

示例2: copyNodeInfoNoChildren

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
private void copyNodeInfoNoChildren(AccessibilityNodeInfoCompat dest, AccessibilityNodeInfoCompat src) {
    Rect rect = this.mTmpRect;
    src.getBoundsInParent(rect);
    dest.setBoundsInParent(rect);
    src.getBoundsInScreen(rect);
    dest.setBoundsInScreen(rect);
    dest.setVisibleToUser(src.isVisibleToUser());
    dest.setPackageName(src.getPackageName());
    dest.setClassName(src.getClassName());
    dest.setContentDescription(src.getContentDescription());
    dest.setEnabled(src.isEnabled());
    dest.setClickable(src.isClickable());
    dest.setFocusable(src.isFocusable());
    dest.setFocused(src.isFocused());
    dest.setAccessibilityFocused(src.isAccessibilityFocused());
    dest.setSelected(src.isSelected());
    dest.setLongClickable(src.isLongClickable());
    dest.addAction(src.getActions());
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:20,代碼來源:DrawerLayout.java

示例3: copyNodeInfoNoChildren

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
/**
 * This should really be in AccessibilityNodeInfoCompat, but there unfortunately
 * seem to be a few elements that are not easily cloneable using the underlying API.
 * Leave it private here as it's not general-purpose useful.
 */
private void copyNodeInfoNoChildren(AccessibilityNodeInfoCompat dest,
    AccessibilityNodeInfoCompat src) {
  final Rect rect = mTmpRect;

  src.getBoundsInParent(rect);
  dest.setBoundsInParent(rect);

  src.getBoundsInScreen(rect);
  dest.setBoundsInScreen(rect);

  dest.setVisibleToUser(src.isVisibleToUser());
  dest.setPackageName(src.getPackageName());
  dest.setClassName(src.getClassName());
  dest.setContentDescription(src.getContentDescription());

  dest.setEnabled(src.isEnabled());
  dest.setClickable(src.isClickable());
  dest.setFocusable(src.isFocusable());
  dest.setFocused(src.isFocused());
  dest.setAccessibilityFocused(src.isAccessibilityFocused());
  dest.setSelected(src.isSelected());
  dest.setLongClickable(src.isLongClickable());

  dest.addAction(src.getActions());
}
 
開發者ID:rogues-dev,項目名稱:superglue,代碼行數:31,代碼來源:DebugDrawerLayout.java

示例4: onPopulateNodeForVirtualView

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
@Override
protected void onPopulateNodeForVirtualView(int virtualViewId, AccessibilityNodeInfoCompat node) {
    node.setClassName(getClass().getName());
    node.addAction(AccessibilityNodeInfoCompat.AccessibilityActionCompat.ACTION_CLICK);

    final int type = getTypeFromId(virtualViewId);
    final int value = getValueFromId(virtualViewId);
    final CharSequence description = getVirtualViewDescription(type, value);
    node.setContentDescription(description);

    getBoundsForVirtualView(virtualViewId, mTempRect);
    node.setBoundsInParent(mTempRect);

    final boolean selected = isVirtualViewSelected(type, value);
    node.setSelected(selected);

    final int nextId = getVirtualViewIdAfter(type, value);
    if (nextId != INVALID_ID) {
        node.setTraversalBefore(RadialTimePickerView.this, nextId);
    }
}
 
開發者ID:Gericop,項目名稱:DateTimePicker,代碼行數:22,代碼來源:RadialTimePickerView.java

示例5: onPopulateNodeForVirtualView

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
@Override
protected void onPopulateNodeForVirtualView(int virtualViewId,
        AccessibilityNodeInfoCompat node) {
    getItemBounds(virtualViewId, mTempRect);

    node.setContentDescription(getItemDescription(virtualViewId));
    node.setBoundsInParent(mTempRect);
    node.addAction(AccessibilityNodeInfo.ACTION_CLICK);

    if (virtualViewId == mSelectedDay) {
        node.setSelected(true);
    }

}
 
開發者ID:LingjuAI,項目名稱:AssistantBySDK,代碼行數:15,代碼來源:MonthView.java

示例6: copyNodeInfoNoChildren

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
/**
 * This should really be in AccessibilityNodeInfoCompat, but there unfortunately
 * seem to be a few elements that are not easily cloneable using the underlying API.
 * Leave it private here as it's not general-purpose useful.
 */
private void copyNodeInfoNoChildren(AccessibilityNodeInfoCompat dest,
                                    AccessibilityNodeInfoCompat src) {
    final Rect rect = mTmpRect;

    src.getBoundsInParent(rect);
    dest.setBoundsInParent(rect);

    src.getBoundsInScreen(rect);
    dest.setBoundsInScreen(rect);

    dest.setVisibleToUser(src.isVisibleToUser());
    dest.setPackageName(src.getPackageName());
    dest.setClassName(src.getClassName());
    dest.setContentDescription(src.getContentDescription());

    dest.setEnabled(src.isEnabled());
    dest.setClickable(src.isClickable());
    dest.setFocusable(src.isFocusable());
    dest.setFocused(src.isFocused());
    dest.setAccessibilityFocused(src.isAccessibilityFocused());
    dest.setSelected(src.isSelected());
    dest.setLongClickable(src.isLongClickable());

    dest.addAction(src.getActions());

    dest.setMovementGranularities(src.getMovementGranularities());
}
 
開發者ID:Jusenr,項目名稱:RX_Demo,代碼行數:33,代碼來源:ResideLayout.java

示例7: onInitializeAccessibilityNodeInfo

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityNodeInfo(View host,
		AccessibilityNodeInfoCompat info) {
	super.onInitializeAccessibilityNodeInfo(host, info);

	final int position = getPositionForView(host);
	final ListAdapter adapter = getAdapter();

	if ((position == INVALID_POSITION) || (adapter == null)) {
		return;
	}

	if (!isEnabled() || !adapter.isEnabled(position)) {
		return;
	}

	if (position == getSelectedItemPosition()) {
		info.setSelected(true);
		info.addAction(AccessibilityNodeInfoCompat.ACTION_CLEAR_SELECTION);
	} else {
		info.addAction(AccessibilityNodeInfoCompat.ACTION_SELECT);
	}

	if (isClickable()) {
		info.addAction(AccessibilityNodeInfoCompat.ACTION_CLICK);
		info.setClickable(true);
	}

	if (isLongClickable()) {
		info.addAction(AccessibilityNodeInfoCompat.ACTION_LONG_CLICK);
		info.setLongClickable(true);
	}

}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:35,代碼來源:AbsHListView.java

示例8: onPopulateNodeForVirtualView

import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; //導入方法依賴的package包/類
protected void onPopulateNodeForVirtualView(int virtualViewId,
                                            AccessibilityNodeInfoCompat node) {
    getItemBounds(virtualViewId, this.mTempRect);
    node.setContentDescription(getItemDescription(virtualViewId));
    node.setBoundsInParent(this.mTempRect);
    node.addAction(16);
    if (virtualViewId == MonthView.this.mSelectedDay) {
        node.setSelected(true);
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:11,代碼來源:MonthView.java


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