Java Code Examples for android.widget.AdapterView#performItemClick()

The following examples show how to use android.widget.AdapterView#performItemClick() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private void performAdapterViewItemClick(MotionEvent e) {
    ViewParent t = getParent();
    while (t != null) {
        if (t instanceof AdapterView) {
            AdapterView view = (AdapterView) t;
            int p = view.getPositionForView(SwipeLayout.this);
            if (p != AdapterView.INVALID_POSITION
                    && view.performItemClick(view.getChildAt(p), p, view
                    .getAdapter().getItemId(p)))
                return;
        } else {
            if (t instanceof View && ((View) t).performClick())
                return;
        }
        t = t.getParent();
    }
}
 
Example 2
private void performAdapterViewItemClick(MotionEvent e) {
    ViewParent t = getParent();
    while (t != null) {
        if (t instanceof AdapterView) {
            AdapterView view = (AdapterView) t;
            int p = view.getPositionForView(SwipeLayoutConv.this);
            if (p != AdapterView.INVALID_POSITION
                    && view.performItemClick(view.getChildAt(p), p, view
                    .getAdapter().getItemId(p)))
                return;
        } else {
            if (t instanceof View && ((View) t).performClick())
                return;
        }
        t = t.getParent();
    }
}
 
Example 3
Source Project: AutoLoadListView   File: ZSwipeItem.java    License: Apache License 2.0 6 votes vote down vote up
private void performAdapterViewItemClick(MotionEvent e) {
	ViewParent t = getParent();

	Log.d(TAG, "performAdapterViewItemClick()");

	while (t != null) {
		if (t instanceof AdapterView) {
			@SuppressWarnings("rawtypes")
			AdapterView view = (AdapterView) t;
			int p = view.getPositionForView(ZSwipeItem.this);
			if (p != AdapterView.INVALID_POSITION
					&& view.performItemClick(
					view.getChildAt(p
							- view.getFirstVisiblePosition()), p,
					view.getAdapter().getItemId(p)))
				return;
		} else {
			if (t instanceof View && ((View) t).performClick())
				return;
		}

		t = t.getParent();
	}
}
 
Example 4
Source Project: ZListVIew   File: ZSwipeItem.java    License: Apache License 2.0 6 votes vote down vote up
private void performAdapterViewItemClick(MotionEvent e) {
	ViewParent t = getParent();

	Log.d(TAG, "performAdapterViewItemClick()");

	while (t != null) {
		if (t instanceof AdapterView) {
			@SuppressWarnings("rawtypes")
			AdapterView view = (AdapterView) t;
			int p = view.getPositionForView(ZSwipeItem.this);
			if (p != AdapterView.INVALID_POSITION
					&& view.performItemClick(
							view.getChildAt(p
									- view.getFirstVisiblePosition()), p,
							view.getAdapter().getItemId(p)))
				return;
		} else {
			if (t instanceof View && ((View) t).performClick())
				return;
		}

		t = t.getParent();
	}
}
 
Example 5
Source Project: UltimateAndroid   File: SwipeLayout.java    License: Apache License 2.0 6 votes vote down vote up
private void performAdapterViewItemClick(MotionEvent e){
    ViewParent t = getParent();
    while(t != null) {
        if(t instanceof AdapterView){
            AdapterView view = (AdapterView)t;
            int p = view.getPositionForView(SwipeLayout.this);
            if( p != AdapterView.INVALID_POSITION &&
                    view.performItemClick(view.getChildAt(p), p, view.getAdapter().getItemId(p)))
                return;
        }else{
            if(t instanceof View && ((View) t).performClick())
                return;
        }
        t = t.getParent();
    }
}
 
Example 6
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayout.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayout.this, position, itemId);
    }
}
 
Example 7
Source Project: talk-android   File: MaterialRippleLayout.java    License: MIT License 5 votes vote down vote up
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayout.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayout.this, position, itemId);
    }
}
 
Example 8
private void performAdapterViewItemClick() {
    if (getOpenStatus() != Status.Close) return;
    ViewParent t = getParent();
    if (t instanceof AdapterView) {
        AdapterView view = (AdapterView) t;
        int p = view.getPositionForView(SwipeLayout.this);
        if (p != AdapterView.INVALID_POSITION) {
            view.performItemClick(view.getChildAt(p - view.getFirstVisiblePosition()), p, view
                    .getAdapter().getItemId(p));
        }
    }
}
 
Example 9
private void performAdapterViewItemClick() {
    ViewParent t = getParent();
    if (t instanceof AdapterView) {
        AdapterView view = (AdapterView) t;
        int p = view.getPositionForView(SwipeItemLayout.this);
        if (p != AdapterView.INVALID_POSITION) {
            view.performItemClick(view.getChildAt(p - view.getFirstVisiblePosition()), p, view.getAdapter().getItemId(p));
        }
    }
}
 
Example 10
private void performAdapterViewItemClick() {
    if (getOpenStatus() != Status.Close) return;
    ViewParent t = getParent();
    if (t instanceof AdapterView) {
        AdapterView view = (AdapterView) t;
        int p = view.getPositionForView(SwipeViewLayout.this);
        if (p != AdapterView.INVALID_POSITION) {
            view.performItemClick(view.getChildAt(p - view.getFirstVisiblePosition()), p, view
                    .getAdapter().getItemId(p));
        }
    }
}
 
Example 11
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(RippleLayout.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(RippleLayout.this, position, itemId);
    }
}
 
Example 12
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayoutNineOld.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayoutNineOld.this, position, itemId);
    }
}
 
Example 13
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayout.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayout.this, position, itemId);
    }
}
 
Example 14
Source Project: LoyalNativeSlider   File: MaterialRippleLayout.java    License: MIT License 5 votes vote down vote up
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayout.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayout.this, position, itemId);
    }
}
 
Example 15
private void performAdapterViewItemClick() {
    if (getOpenStatus() != Status.Close) return;
    ViewParent t = getParent();
    if (t instanceof AdapterView) {
        AdapterView view = (AdapterView) t;
        int p = view.getPositionForView(SwipeLayout.this);
        if (p != AdapterView.INVALID_POSITION) {
            view.performItemClick(view.getChildAt(p - view.getFirstVisiblePosition()), p, view
                    .getAdapter().getItemId(p));
        }
    }
}
 
Example 16
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayoutNineOld.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayoutNineOld.this, position, itemId);
    }
}
 
Example 17
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayout.this);
    final long itemId = parent.getAdapter() != null
            ? parent.getAdapter().getItemId(position)
            : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayout.this, position, itemId);
    }
}
 
Example 18
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayout.this);
    final long itemId = parent.getAdapter() != null
        ? parent.getAdapter().getItemId(position)
        : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayout.this, position, itemId);
    }
}
 
Example 19
private void clickAdapterView(AdapterView parent) {
    final int position = parent.getPositionForView(MaterialRippleLayout.this);
    final long itemId = parent.getAdapter() != null
        ? parent.getAdapter().getItemId(position)
        : 0;
    if (position != AdapterView.INVALID_POSITION) {
        parent.performItemClick(MaterialRippleLayout.this, position, itemId);
    }
}
 
Example 20
Source Project: AndroidSwipeLayout   File: SwipeLayout.java    License: MIT License 5 votes vote down vote up
private void performAdapterViewItemClick() {
    if (getOpenStatus() != Status.Close) return;
    ViewParent t = getParent();
    if (t instanceof AdapterView) {
        AdapterView view = (AdapterView) t;
        int p = view.getPositionForView(SwipeLayout.this);
        if (p != AdapterView.INVALID_POSITION) {
            view.performItemClick(view.getChildAt(p - view.getFirstVisiblePosition()), p, view
                    .getAdapter().getItemId(p));
        }
    }
}