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

The following examples show how to use android.widget.AdapterView#performItemClick() . 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
Source File: SwipeLayoutConv.java    From o2oa with GNU Affero General Public License v3.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(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 2
Source File: SwipeLayout.java    From o2oa with GNU Affero General Public License v3.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 3
Source File: SwipeLayout.java    From UltimateAndroid with 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 4
Source File: ZSwipeItem.java    From ZListVIew with 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 File: ZSwipeItem.java    From AutoLoadListView with 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 6
Source File: SwipeLayout.java    From AndroidSwipeLayout with 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));
        }
    }
}
 
Example 7
Source File: MaterialRippleLayout.java    From UltimateAndroid with Apache License 2.0 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
Source File: MaterialRippleLayout.java    From material-ripple with Apache License 2.0 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 9
Source File: MaterialRippleLayout.java    From AdvancedMaterialDrawer with Apache License 2.0 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 10
Source File: MaterialRippleLayoutNineOld.java    From AdvancedMaterialDrawer with Apache License 2.0 5 votes vote down vote up
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 11
Source File: SwipeLayout.java    From UltimateRecyclerView with Apache License 2.0 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));
        }
    }
}
 
Example 12
Source File: MaterialRippleLayout.java    From LoyalNativeSlider with 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 13
Source File: MaterialRippleLayout.java    From KickAssSlidingMenu with Apache License 2.0 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 14
Source File: MaterialRippleLayoutNineOld.java    From KickAssSlidingMenu with Apache License 2.0 5 votes vote down vote up
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 15
Source File: RippleLayout.java    From fingerpoetry-android with Apache License 2.0 5 votes vote down vote up
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 16
Source File: SwipeViewLayout.java    From UltimateSwipeTool with Apache License 2.0 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(SwipeViewLayout.this);
        if (p != AdapterView.INVALID_POSITION) {
            view.performItemClick(view.getChildAt(p - view.getFirstVisiblePosition()), p, view
                    .getAdapter().getItemId(p));
        }
    }
}
 
Example 17
Source File: SwipeItemLayout.java    From IndexRecyclerView with Apache License 2.0 5 votes vote down vote up
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 18
Source File: SwipeLayout.java    From StickyListHeadersWithRefreshAndLoadMore with Apache License 2.0 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));
        }
    }
}
 
Example 19
Source File: MaterialRippleLayout.java    From talk-android with 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 20
Source File: MaterialRippleLayout.java    From MDPreference with Apache License 2.0 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);
    }
}