Lines Matching refs:position

234      * Given a list position, returns the index of the corresponding partition.
236 public int getPartitionForPosition(int position) {
241 if (position >= start && position < end) {
250 * Given a list position, return the offset of the corresponding item in its
253 public int getOffsetInPartition(int position) {
258 if (position >= start && position < end) {
259 int offset = position - start;
271 * Returns the first list position for the specified partition.
275 int position = 0;
277 position += mPartitions[i].count;
279 return position;
297 * Returns the view type for the list item at the specified position in the
300 protected int getItemViewType(int partition, int position) {
305 public int getItemViewType(int position) {
310 if (position >= start && position < end) {
311 int offset = position - start;
315 return getItemViewType(i, position);
320 throw new ArrayIndexOutOfBoundsException(position);
323 public View getView(int position, View convertView, ViewGroup parent) {
328 if (position >= start && position < end) {
329 int offset = position - start;
338 throw new IllegalStateException("Couldn't move cursor to position "
345 + " position: " + offset);
352 throw new ArrayIndexOutOfBoundsException(position);
384 protected View getView(int partition, Cursor cursor, int position, View convertView,
390 view = newView(mContext, partition, cursor, position, parent);
392 bindView(view, partition, cursor, position);
397 * Creates an item view for the specified partition and position. Position
398 * corresponds directly to the current cursor position.
400 protected abstract View newView(Context context, int partition, Cursor cursor, int position,
404 * Binds an item view for the specified partition and position. Position
405 * corresponds directly to the current cursor position.
407 protected abstract void bindView(View v, int partition, Cursor cursor, int position);
410 * Returns a pre-positioned cursor for the specified list position.
412 public Object getItem(int position) {
417 if (position >= start && position < end) {
418 int offset = position - start;
436 * Returns the item ID for the specified list position.
438 public long getItemId(int position) {
443 if (position >= start && position < end) {
444 int offset = position - start;
484 public boolean isEnabled(int position) {
489 if (position >= start && position < end) {
490 int offset = position - start;
507 protected boolean isEnabled(int partition, int position) {