当前位置: 首页>>代码示例>>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;未经允许,请勿转载。