本文整理了Java中android.widget.ListView.onTouchEvent()
方法的一些代码示例,展示了ListView.onTouchEvent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.onTouchEvent()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:onTouchEvent
暂无
代码示例来源:origin: rey5137/material
@Override
public boolean onTouchEvent(MotionEvent ev) {
switch (ev.getAction()) {
case MotionEvent.ACTION_DOWN:
mMotionPosition = pointToPosition((int) ev.getX(), (int) ev.getY());
break;
}
return super.onTouchEvent(ev);
}
protected void updateSelectorStateCompat() {
代码示例来源:origin: GitLqr/LQRWeChat
break;
return super.onTouchEvent(ev);
代码示例来源:origin: ksoichiro/Android-ObservableScrollView
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (hasNoCallbacks()) {
return super.onTouchEvent(ev);
return super.onTouchEvent(ev);
return super.onTouchEvent(ev);
代码示例来源:origin: stackoverflow.com
cancelEvent.setAction(MotionEvent.ACTION_CANCEL |
(motionEvent.getActionIndex() << MotionEvent.ACTION_POINTER_INDEX_SHIFT));
mListView.onTouchEvent(cancelEvent);
代码示例来源:origin: jiangqqlmj/FastDev4Android
return super.onTouchEvent(event);
代码示例来源:origin: stackoverflow.com
mList.onTouchEvent(cancelFling);
cancelFling.recycle();
代码示例来源:origin: TommyLemon/APIJSON
return super.onTouchEvent(ev);
代码示例来源:origin: sunfusheng/StickyHeaderListView
return super.onTouchEvent(ev);
代码示例来源:origin: Neamar/KISS
@Override
public boolean onTouchEvent(MotionEvent ev) {
return this.touchEventsBlocked || super.onTouchEvent(ev);
}
}
代码示例来源:origin: UweTrottmann/SeriesGuide
return super.onTouchEvent(ev);
if (super.onTouchEvent(ev)) {
more = true;
代码示例来源:origin: huxq17/XRefreshView
return super.onTouchEvent(ev);
代码示例来源:origin: UweTrottmann/SeriesGuide
switch (mCancelMethod) {
case ON_TOUCH_EVENT:
super.onTouchEvent(mCancelEvent);
break;
case ON_INTERCEPT_TOUCH_EVENT:
代码示例来源:origin: UweTrottmann/SeriesGuide
super.onTouchEvent(mCancelEvent);
break;
case ON_INTERCEPT_TOUCH_EVENT:
代码示例来源:origin: linxin6560/DetailScrollView
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (mHelper == null)
return super.onTouchEvent(ev);
if (!mHelper.onTouchEvent(ev))
return false;
return super.onTouchEvent(ev);
}
代码示例来源:origin: jackuhan/AndroidMonitor
@Override
public boolean onTouchEvent(MotionEvent ev) {
try {
return super.onTouchEvent(ev);
} catch (Exception e) {
log.d(e, "");
return false;
}
}
}
代码示例来源:origin: com.nhaarman.listviewanimations/lib-manipulation
@Override
public boolean onTouchEvent(@NonNull final MotionEvent ev) {
if (mCurrentHandlingTouchEventHandler != null) {
mCurrentHandlingTouchEventHandler.onTouchEvent(ev);
}
if (ev.getActionMasked() == MotionEvent.ACTION_UP || ev.getActionMasked() == MotionEvent.ACTION_CANCEL) {
/* Gesture is finished, reset the active TouchEventHandler */
mCurrentHandlingTouchEventHandler = null;
}
return mCurrentHandlingTouchEventHandler != null || super.onTouchEvent(ev);
}
代码示例来源:origin: adamantoise/robocrosswords
private void cancelFling() {
// Cancel the list fling
MotionEvent cancelFling = MotionEvent.obtain(0, 0, MotionEvent.ACTION_CANCEL, 0, 0, 0);
mList.onTouchEvent(cancelFling);
cancelFling.recycle();
}
代码示例来源:origin: com.albedinsky.android/ui-widget-collection
/**
*/
@Override
public boolean onTouchEvent(@NonNull MotionEvent event) {
this.ensureDecorator();
return mDecorator.onTouchEvent(event) || super.onTouchEvent(event);
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
public boolean onTouchEvent(@NonNull MotionEvent event) {
this.ensureDecorator();
return mDecorator.onTouchEvent(event) || super.onTouchEvent(event);
}
代码示例来源:origin: h6ah4i/android-scrollableviewpagercontent
@Override
@SuppressLint("ClickableViewAccessibility")
public boolean onTouchEvent(MotionEvent ev) {
if (ensureDelegator().onTouchEvent(this, ev)) {
return true;
}
return super.onTouchEvent(ev);
}
}
内容来源于网络,如有侵权,请联系作者删除!