本文整理匯總了Java中android.support.v4.view.accessibility.AccessibilityRecordCompat.setMaxScrollX方法的典型用法代碼示例。如果您正苦於以下問題:Java AccessibilityRecordCompat.setMaxScrollX方法的具體用法?Java AccessibilityRecordCompat.setMaxScrollX怎麽用?Java AccessibilityRecordCompat.setMaxScrollX使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v4.view.accessibility.AccessibilityRecordCompat
的用法示例。
在下文中一共展示了AccessibilityRecordCompat.setMaxScrollX方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onInitializeAccessibilityEvent
import android.support.v4.view.accessibility.AccessibilityRecordCompat; //導入方法依賴的package包/類
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(host, event);
NestedScrollView nsvHost = (NestedScrollView) host;
event.setClassName(ScrollView.class.getName());
AccessibilityRecordCompat record = AccessibilityEventCompat.asRecord(event);
record.setScrollable(nsvHost.getScrollRange() > 0);
record.setScrollX(nsvHost.getScrollX());
record.setScrollY(nsvHost.getScrollY());
record.setMaxScrollX(nsvHost.getScrollX());
record.setMaxScrollY(nsvHost.getScrollRange());
}
示例2: onInitializeAccessibilityEvent
import android.support.v4.view.accessibility.AccessibilityRecordCompat; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(host, event);
final SSScrollView nsvHost = (SSScrollView) host;
event.setClassName(ScrollView.class.getName());
final AccessibilityRecordCompat record = AccessibilityEventCompat.asRecord(event);
final boolean scrollable = nsvHost.getScrollRange() > 0;
record.setScrollable(scrollable);
record.setScrollX(nsvHost.getScrollX());
record.setScrollY(nsvHost.getScrollY());
record.setMaxScrollX(nsvHost.getScrollX());
record.setMaxScrollY(nsvHost.getScrollRange());
}
示例3: onInitializeAccessibilityEvent
import android.support.v4.view.accessibility.AccessibilityRecordCompat; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(View host,
AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(host, event);
final TwoWayNestedScrollView nsvHost = (TwoWayNestedScrollView) host;
event.setClassName(ScrollView.class.getName());
final AccessibilityRecordCompat record = AccessibilityEventCompat
.asRecord(event);
final boolean scrollable = nsvHost.getVerticalScrollRange() > 0 || nsvHost.getHorizontalScrollRange() > 0;
record.setScrollable(scrollable);
record.setScrollX(nsvHost.getScrollX());
record.setScrollY(nsvHost.getScrollY());
record.setMaxScrollX(nsvHost.getHorizontalScrollRange());
record.setMaxScrollY(nsvHost.getVerticalScrollRange());
}
示例4: onInitializeAccessibilityEvent
import android.support.v4.view.accessibility.AccessibilityRecordCompat; //導入方法依賴的package包/類
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
super.onInitializeAccessibilityEvent(host, event);
final NestedScrollView nsvHost = (NestedScrollView) host;
event.setClassName(ScrollView.class.getName());
final AccessibilityRecordCompat record = AccessibilityEventCompat.asRecord(event);
final boolean scrollable = nsvHost.getScrollRange() > 0;
record.setScrollable(scrollable);
record.setScrollX(nsvHost.getScrollX());
record.setScrollY(nsvHost.getScrollY());
record.setMaxScrollX(nsvHost.getScrollX());
record.setMaxScrollY(nsvHost.getScrollRange());
}