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


Java AccessibilityEvent.setClassName方法代碼示例

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


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

示例1: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(host, event);
    event.setClassName(DirectionalViewpager.class.getName());
    AccessibilityRecordCompat recordCompat = null;
    if (isHorizontal()) {
        recordCompat =
                AccessibilityEventCompat.asRecord(event);
    } else {
        recordCompat = AccessibilityRecordCompat.obtain();
    }
    recordCompat.setScrollable(canScroll());
    if (event.getEventType() == AccessibilityEventCompat.TYPE_VIEW_SCROLLED
            && mAdapter != null) {
        recordCompat.setItemCount(mAdapter.getCount());
        recordCompat.setFromIndex(mCurItem);
        recordCompat.setToIndex(mCurItem);
    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:20,代碼來源:DirectionalViewpager.java

示例2: dispatchPopulateAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
    event.setClassName(getClass().getName());
    event.setPackageName(getPackageName());

    LayoutParams params = getWindow().getAttributes();
    boolean isFullScreen = (params.width == LayoutParams.MATCH_PARENT) &&
            (params.height == LayoutParams.MATCH_PARENT);
    event.setFullScreen(isFullScreen);

    CharSequence title = getTitle();
    if (!TextUtils.isEmpty(title)) {
        event.getText().add(title);
    }

    return true;
}
 
開發者ID:JessYanCoding,項目名稱:ProgressManager,代碼行數:17,代碼來源:a.java

示例3: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
  super.onInitializeAccessibilityEvent(event);
  if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_SELECTED) {
    event.getText().add(getProgressText());
  }
  event.setClassName(DefaultTimeBar.class.getName());
}
 
開發者ID:yangchaojiang,項目名稱:yjPlay,代碼行數:9,代碼來源:DefaultTimeBar.java

示例4: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
/**
 */
@Override
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public void onInitializeAccessibilityEvent(@NonNull AccessibilityEvent event) {
	super.onInitializeAccessibilityEvent(event);
	event.setClassName(AutoCompleteTextViewWidget.class.getName());
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:9,代碼來源:AutoCompleteTextViewWidget.java

示例5: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(host, event);
    event.setClassName(ViewPager.class.getName());
    final AccessibilityRecordCompat recordCompat = AccessibilityRecordCompat.obtain();
    recordCompat.setScrollable(canScroll());
    if (event.getEventType() == AccessibilityEventCompat.TYPE_VIEW_SCROLLED
            && mAdapter != null) {
        recordCompat.setItemCount(mAdapter.getCount());
        recordCompat.setFromIndex(mCurItem);
        recordCompat.setToIndex(mCurItem);
    }
}
 
開發者ID:benniaobuguai,項目名稱:android-project-gallery,代碼行數:14,代碼來源:ViewPagerCompat.java

示例6: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
/**
 */
@Override
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public void onInitializeAccessibilityEvent(@NonNull AccessibilityEvent event) {
	super.onInitializeAccessibilityEvent(event);
	event.setClassName(ImageButtonWidget.class.getName());
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:9,代碼來源:ImageViewWidget.java

示例7: sendAccessibilityEventForVirtualButton

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
private void sendAccessibilityEventForVirtualButton(int virtualViewId, int eventType,
                                                    String text) {
    //if (AccessibilityManager.getInstance(mContext).isEnabled()) {
    if (accessibilityManager != null && accessibilityManager.isEnabled()) {
        AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
        event.setClassName(Button.class.getName());
        event.setPackageName(getContext().getPackageName());
        event.getText().add(text);
        event.setEnabled(NumberPicker.this.isEnabled());
        AccessibilityRecordCompat.setSource(event, NumberPicker.this, virtualViewId);
        //event.setSource(NumberPicker.this, virtualViewId);
        requestSendAccessibilityEvent(NumberPicker.this, event);
    }
}
 
開發者ID:Gericop,項目名稱:DateTimePicker,代碼行數:15,代碼來源:NumberPicker.java

示例8: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setClassName(NumberPicker.class.getName());
    event.setScrollable(true);
    event.setScrollY((mMinValue + mValue) * mSelectorElementHeight);
    event.setMaxScrollY((mMaxValue - mMinValue) * mSelectorElementHeight);
}
 
開發者ID:helenepang,項目名稱:LimitedDatePicker,代碼行數:9,代碼來源:NumberPicker.java

示例9: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
/**
 */
@Override
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public void onInitializeAccessibilityEvent(@NonNull AccessibilityEvent event) {
	super.onInitializeAccessibilityEvent(event);
	event.setClassName(WebViewWidget.class.getName());
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:9,代碼來源:WebViewWidget.java

示例10: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
/**
 */
@Override
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
public void onInitializeAccessibilityEvent(@NonNull AccessibilityEvent event) {
	super.onInitializeAccessibilityEvent(event);
	event.setClassName(TextViewWidget.class.getName());
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:9,代碼來源:TextViewWidget.java

示例11: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
	super.onInitializeAccessibilityEvent(event);
	event.setClassName(HListView.class.getName());
}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:6,代碼來源:HListView.java

示例12: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setClassName(SurfaceRenderView.class.getName());
}
 
開發者ID:WeDevelopTeam,項目名稱:HeroVideo-master,代碼行數:6,代碼來源:SurfaceRenderView.java

示例13: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setClassName(Button.class.getName());
}
 
開發者ID:ttpho,項目名稱:TimePicker,代碼行數:6,代碼來源:AccessibleTextView.java

示例14: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
  super.onInitializeAccessibilityEvent(host, event);
  event.setClassName(Button.class.getName());
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:6,代碼來源:AccessibilityHelper.java

示例15: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
  super.onInitializeAccessibilityEvent(host, event);

  event.setClassName(DebugDrawerLayout.class.getName());
}
 
開發者ID:rogues-dev,項目名稱:superglue,代碼行數:7,代碼來源:DebugDrawerLayout.java


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