本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}