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


Java RecyclerView.findChildViewUnder方法代碼示例

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


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

示例1: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public final boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
    if (gestureDetector.onTouchEvent(e)) {
        View touchedView = rv.findChildViewUnder(e.getX(), e.getY());
        onItemSelected(rv.findContainingViewHolder(touchedView),
                rv.getChildAdapterPosition(touchedView));
    }
    return false;
}
 
開發者ID:googlesamples,項目名稱:android-instant-apps,代碼行數:10,代碼來源:OnItemSelectedListener.java

示例2: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
    View childView = view.findChildViewUnder(e.getX(), e.getY());
    if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
        mListener.onItemClick(childView, view.getChildPosition(childView));
        return true;
    }
    return false;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:9,代碼來源:RecyclerItemClickListener.java

示例3: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {

    View child = rv.findChildViewUnder(e.getX(), e.getY());
    if (child != null && clickListener != null && gestureDetector.onTouchEvent(e)) {
        clickListener.onClick(child, rv.getChildPosition(child));
    }
    return false;
}
 
開發者ID:vikasdesale,項目名稱:Wings2K16,代碼行數:10,代碼來源:NavigationDrawerFragment.java

示例4: clickAction

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
protected boolean clickAction(RecyclerView view, MotionEvent e) {
    // Get interacted view from x,y coordinate.
    View childView = view.findChildViewUnder(e.getX(), e.getY());

    if (childView != null && m_jGestureDetector.onTouchEvent(e)) {
        // Find the view holder
        AbstractViewHolder holder = (AbstractViewHolder) m_jRecyclerView.getChildViewHolder
                (childView);

        // Get y position from adapter
        CellRowRecyclerViewAdapter adapter = (CellRowRecyclerViewAdapter) m_jRecyclerView
                .getAdapter();

        int nXPosition = holder.getAdapterPosition();
        int nYPosition = adapter.getYPosition();

        // Control to ignore selection color
        if (!m_iTableView.isIgnoreSelectionColors()) {
            m_iSelectionHandler.setSelectedCellPositions(holder, nXPosition, nYPosition);
        }

        if (getTableViewListener() != null) {
            // Call ITableView listener for item click
            getTableViewListener().onCellClicked(holder, nXPosition, nYPosition);
        }

        return true;
    }
    return false;
}
 
開發者ID:evrencoskun,項目名稱:TableView,代碼行數:32,代碼來源:CellRecyclerViewItemClickListener.java

示例5: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView recyclerView, MotionEvent e) {

    View child = recyclerView.findChildViewUnder(e.getX(), e.getY());
    if (child != null && clickListener != null && gestureDetector.onTouchEvent(e)) {
        clickListener.onClick(child, recyclerView.getChildLayoutPosition(child));
    }
    return false;
}
 
開發者ID:CityZenApp,項目名稱:Android-Development,代碼行數:10,代碼來源:RecyclerViewTouchListener.java

示例6: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
    View child = rv.findChildViewUnder(e.getX(),e.getY());
    if(child!= null && click_listener != null && gestureDetector.onTouchEvent(e) ){
        click_listener.onClick(child,rv.getChildPosition(child));
    }
    return false;
}
 
開發者ID:Rishabhk07,項目名稱:multi-copy,代碼行數:9,代碼來源:RecyclerTouchListener.java

示例7: updateSelectedRange

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
private void updateSelectedRange(RecyclerView rv, float x, float y)
{
    View child = rv.findChildViewUnder(x, y);
    if (child != null)
    {
        int position = rv.getChildAdapterPosition(child);
        if (position != RecyclerView.NO_POSITION && mEnd != position)
        {
            mEnd = position;
            notifySelectRangeChange();
        }
    }
}
 
開發者ID:MFlisar,項目名稱:DragSelectRecyclerView,代碼行數:14,代碼來源:DragSelectTouchListener.java

示例8: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
    View childView = view.findChildViewUnder(e.getX(), e.getY());
    if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
        mListener.onItemClick(childView, view.getChildPosition(childView), e.getX(), e.getY());
        return true;
    }
    return false;
}
 
開發者ID:Auto-Droid,項目名稱:TMDB-App,代碼行數:10,代碼來源:RecyclerItemClickListener.java

示例9: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
    View childView = view.findChildViewUnder(e.getX(), e.getY());
    if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
        mListener.onItemClick(childView, view.getChildAdapterPosition(childView));
    }
    return false;
}
 
開發者ID:appteam-nith,項目名稱:Nimbus,代碼行數:9,代碼來源:OnItemTouchListener.java

示例10: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
	View childView = view.findChildViewUnder(e.getX(), e.getY());
	if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
		mListener.onItemClick(childView, view.getChildAdapterPosition(childView));
	}
	return false;
}
 
開發者ID:Komdosh,項目名稱:SocEltech,代碼行數:9,代碼來源:RecyclerItemClickListener.java

示例11: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public final boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
    if (gestureDetector.onTouchEvent(e)) {
        final View touchedView = rv.findChildViewUnder(e.getX(), e.getY());
        if (touchedView == null) return false;

        onItemSelected(rv.findContainingViewHolder(touchedView),
                rv.getChildAdapterPosition(touchedView));
    }
    return false;
}
 
開發者ID:Pingsh,項目名稱:Mix,代碼行數:12,代碼來源:OnItemSelectedListener.java

示例12: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
    View childView = view.findChildViewUnder(e.getX(), e.getY());
    if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
        mListener.onItemClick(childView, view.getChildLayoutPosition(childView));
        return true;
    }
    return false;
}
 
開發者ID:malijie,項目名稱:PhotoPicker-master,代碼行數:10,代碼來源:RecyclerItemClickListener.java

示例13: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
    View child = rv.findChildViewUnder(e.getX(), e.getY());
    if (child != null && clickListener != null && gestureDetector.onTouchEvent(e)) {
        clickListener.onClick(child, rv.getChildPosition(child));
    }
    return false;
}
 
開發者ID:anandwana001,項目名稱:Tech-Jalsa,代碼行數:9,代碼來源:RecyclerTouchListener.java

示例14: onInterceptTouchEvent

import android.support.v7.widget.RecyclerView; //導入方法依賴的package包/類
@Override
public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent event) {
    childView = view.findChildViewUnder(event.getX(), event.getY());
    childViewPosition = view.getChildLayoutPosition(childView);
    return childView != null && gestureDetector.onTouchEvent(event);
}
 
開發者ID:chashmeetsingh,項目名稱:TrackIt-Android,代碼行數:7,代碼來源:RecyclerItemClickListener.java


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