当前位置: 首页>>代码示例>>Java>>正文


Java AccessibilityEvent.setScrollable方法代码示例

本文整理汇总了Java中android.view.accessibility.AccessibilityEvent.setScrollable方法的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityEvent.setScrollable方法的具体用法?Java AccessibilityEvent.setScrollable怎么用?Java AccessibilityEvent.setScrollable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.accessibility.AccessibilityEvent的用法示例。


在下文中一共展示了AccessibilityEvent.setScrollable方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sendScrollAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
private void sendScrollAccessibilityEvent() {
    AccessibilityManager am =
            (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
    if (am.isEnabled()) {
        if (mCurrentPage != getNextPage()) {
            AccessibilityEvent ev =
                    AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED);
            ev.setScrollable(true);
            ev.setScrollX(getScrollX());
            ev.setScrollY(getScrollY());
            ev.setMaxScrollX(mMaxScrollX);
            ev.setMaxScrollY(0);

            sendAccessibilityEventUnchecked(ev);
        }
    }
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:18,代码来源:PagedView.java

示例2: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setScrollable(isScrollableForAccessibility());
    View selectedView = getSelectedView();
    if (selectedView != null) {
        event.setEnabled(selectedView.isEnabled());
    }
    event.setCurrentItemIndex(getSelectedItemPosition());
    event.setFromIndex(getFirstVisiblePosition());
    event.setToIndex(getLastVisiblePosition());
    event.setItemCount(getCount());
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:14,代码来源:IcsAdapterView.java

示例3: 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:SavorGit,项目名称:Hotspot-master-devp,代码行数:9,代码来源:NumberPicker.java

示例4: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setClassName(NumberPicker.class.getName());

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        event.setScrollable(true);
        event.setScrollY((mMinValue + mValue) * mSelectorElementHeight);
    }
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
        event.setMaxScrollY((mMaxValue - mMinValue) * mSelectorElementHeight);
    }
}
 
开发者ID:h6ah4i,项目名称:android-numberpickercompat,代码行数:14,代码来源:NumberPicker.java

示例5: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
@TargetApi(14)
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setClassName(AdapterView.class.getName());
    event.setScrollable(isScrollableForAccessibility());
    View selectedView = getSelectedView();
    if (selectedView != null) {
        event.setEnabled(selectedView.isEnabled());
    }
    event.setCurrentItemIndex(getSelectedItemPosition());
    event.setFromIndex(getFirstVisiblePosition());
    event.setToIndex(getLastVisiblePosition());
    event.setItemCount(getCount());
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:15,代码来源:AdapterView.java

示例6: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
@TargetApi(14)
@Override
public void onInitializeAccessibilityEvent( AccessibilityEvent event ) {
	super.onInitializeAccessibilityEvent( event );
	event.setClassName( AdapterView.class.getName() );
	event.setScrollable( isScrollableForAccessibility() );
	View selectedView = getSelectedView();
	if ( selectedView != null ) {
		event.setEnabled( selectedView.isEnabled() );
	}
	event.setCurrentItemIndex( getSelectedItemPosition() );
	event.setFromIndex( getFirstVisiblePosition() );
	event.setToIndex( getLastVisiblePosition() );
	event.setItemCount( getCount() );
}
 
开发者ID:junchenChow,项目名称:exciting-app,代码行数:16,代码来源:AdapterView.java

示例7: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
public void onInitializeAccessibilityEvent(AccessibilityEvent paramAccessibilityEvent) {
	super.onInitializeAccessibilityEvent(paramAccessibilityEvent);
	paramAccessibilityEvent.setScrollable(isScrollableForAccessibility());
	View localView = getSelectedView();
	if (localView != null)
		paramAccessibilityEvent.setEnabled(localView.isEnabled());
	paramAccessibilityEvent.setCurrentItemIndex(getSelectedItemPosition());
	paramAccessibilityEvent.setFromIndex(getFirstVisiblePosition());
	paramAccessibilityEvent.setToIndex(getLastVisiblePosition());
	paramAccessibilityEvent.setItemCount(getCount());
}
 
开发者ID:Evan-Galvin,项目名称:FreeStreams-TVLauncher,代码行数:12,代码来源:AdapterView.java

示例8: onInitializeAccessibilityEventInternal

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
public void onInitializeAccessibilityEventInternal(AccessibilityEvent event) {
    event.setClassName(NumberPicker.class.getName());
    event.setScrollable(true);
    event.setScrollY((mMinValue + mValue) * mSelectorElementHeight);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { // FIXME what about API 14?
        event.setMaxScrollY((mMaxValue - mMinValue) * mSelectorElementHeight);
    }
}
 
开发者ID:Gericop,项目名称:DateTimePicker,代码行数:10,代码来源:NumberPicker.java

示例9: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setScrollable(getPageCount() > 1);
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:6,代码来源:PagedView.java

示例10: setScrollable

import android.view.accessibility.AccessibilityEvent; //导入方法依赖的package包/类
public static void setScrollable(AccessibilityEvent event, boolean scrollable) {
    event.setScrollable(scrollable);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityEventCompatIcs.java


注:本文中的android.view.accessibility.AccessibilityEvent.setScrollable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。