Java Code Examples for android.widget.listview#getId()
The following examples show how to use
android.widget.listview#getId() .
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: ListBuddiesLayout.java From UltimateAndroid with Apache License 2.0 | 6 votes |
private void performClick(ListView list) { //In some occasions setOnListScrollListener-SCROLL_STATE_TOUCH_SCROLL //doesn't get called when we perform a click, so we need to double check if (!isUserInteracting) { isUserInteracting = true; } if (mDownView != null || mSpeed == 0) { mDownView.setPressed(false); if (mItemBuddyListener != null) { int buddy = 0; if (list.getId() != mListViewLeft.getId()) { buddy = 1; } int position = getPosition(list, mDownPosition); mItemBuddyListener.onBuddyItemClicked(list, mDownView, buddy, position, mDownView.getId()); } } }
Example 2
Source File: ListBuddiesLayout.java From UltimateAndroid with Apache License 2.0 | 6 votes |
private void performClick(ListView list) { //In some occasions setOnListScrollListener-SCROLL_STATE_TOUCH_SCROLL //doesn't get called when we perform a click, so we need to double check if (!isUserInteracting) { isUserInteracting = true; } if (mDownView != null || mSpeed == 0) { mDownView.setPressed(false); if (mItemBuddyListener != null) { int buddy = 0; if (list.getId() != mListViewLeft.getId()) { buddy = 1; } int position = getPosition(list, mDownPosition); mItemBuddyListener.onBuddyItemClicked(list, mDownView, buddy, position, mDownView.getId()); } } }
Example 3
Source File: ListBuddiesLayout.java From ListBuddies with Apache License 2.0 | 6 votes |
private void performClick(ListView list) { //In some occasions setOnListScrollListener-SCROLL_STATE_TOUCH_SCROLL //doesn't get called when we perform a click, so we need to double check if (!isUserInteracting) { isUserInteracting = true; } if (mDownView != null || (mSpeed == 0 && mDownView != null)) { mDownView.setPressed(false); if (mItemBuddyListener != null) { int buddy = 0; if (list.getId() != mListViewLeft.getId()) { buddy = 1; } int position = getPosition(list, mDownPosition); mItemBuddyListener.onBuddyItemClicked(list, mDownView, buddy, position, mDownView.getId()); } } }
Example 4
Source File: ResultQoSDetailView.java From open-rmbt with Apache License 2.0 | 5 votes |
@SuppressWarnings("unchecked") @Override public void onItemClick(AdapterView<?> adapter, View view, int position, long id) { ListView listView = (ListView) adapter; HashMap<String, String> item = (HashMap<String, String>) listView.getAdapter().getItem(position); if (listView.getId() == R.id.qos_success_list) { activity.showExpandedResultDetail(results, DetailType.OK, Integer.valueOf(item.get("index"))); } else if (listView.getId() == R.id.qos_error_list) { activity.showExpandedResultDetail(results, DetailType.FAIL, Integer.valueOf(item.get("index"))); } }
Example 5
Source File: EndlessScrollListener.java From buddycloud-android with Apache License 2.0 | 5 votes |
@Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { boolean loadMore = firstVisibleItem + visibleItemCount + VISIBLE_THRESHOLD >= totalItemCount; if (loadMore && !loading && !refreshing) { fragment.fillMore(); } // enable/disable pull-to-refresh SwipeRefreshLayout refreshLayout = fragment.getSwipeRefreshLayout(); if (firstVisibleItem == 0 && refreshLayout != null) { refreshLayout.setEnabled(true); } else { refreshLayout.setEnabled(false); } // show/hide post "+" button final ListView lw = fragment.getPostStreamView(); if (view.getId() == lw.getId()) { final int currentFirstVisibleItem = lw.getFirstVisiblePosition(); if (currentFirstVisibleItem > mLastFirstVisibleItem) { fragment.hideAddPostTopicBtn(); } else if (currentFirstVisibleItem < mLastFirstVisibleItem) { fragment.showAddPostTopicBtn(); } mLastFirstVisibleItem = currentFirstVisibleItem; } }
Example 6
Source File: ListBuddiesLayout.java From UltimateAndroid with Apache License 2.0 | 4 votes |
private void actionDown(ListView list, MotionEvent event) { mActionDown = true; toogleListView(list); mLastViewTouchId = list.getId(); startClickSelection(event, list, event.getY()); }
Example 7
Source File: ListBuddiesLayout.java From UltimateAndroid with Apache License 2.0 | 4 votes |
private void actionDown(ListView list, MotionEvent event) { mActionDown = true; toogleListView(list); mLastViewTouchId = list.getId(); startClickSelection(event, list, event.getY()); }
Example 8
Source File: ListBuddiesLayout.java From ListBuddies with Apache License 2.0 | 4 votes |
private void actionDown(ListView list, MotionEvent event) { mActionDown = true; toogleListView(list); mLastViewTouchId = list.getId(); startClickSelection(event, list, event.getY()); }