Lines Matching refs:position

231      * Given a list position, returns the index of the corresponding partition.
233 public int getPartitionForPosition(int position) {
238 if (position >= start && position < end) {
247 * Given a list position, return the offset of the corresponding item in its
250 public int getOffsetInPartition(int position) {
255 if (position >= start && position < end) {
256 int offset = position - start;
268 * Returns the first list position for the specified partition.
272 int position = 0;
274 position += mPartitions.get(i).count;
276 return position;
294 * Returns the view type for the list item at the specified position in the
297 protected int getItemViewType(int partition, int position) {
302 public int getItemViewType(int position) {
307 if (position >= start && position < end) {
308 int offset = position - start;
321 throw new ArrayIndexOutOfBoundsException(position);
324 public View getView(int position, View convertView, ViewGroup parent) {
329 if (position >= start && position < end) {
330 int offset = position - start;
339 throw new IllegalStateException("Couldn't move cursor to position "
346 + " position: " + offset);
353 throw new ArrayIndexOutOfBoundsException(position);
385 protected View getView(int partition, Cursor cursor, int position, View convertView,
391 view = newView(mContext, partition, cursor, position, parent);
393 bindView(view, partition, cursor, position);
398 * Creates an item view for the specified partition and position. Position
399 * corresponds directly to the current cursor position.
401 protected abstract View newView(Context context, int partition, Cursor cursor, int position,
405 * Binds an item view for the specified partition and position. Position
406 * corresponds directly to the current cursor position.
408 protected abstract void bindView(View v, int partition, Cursor cursor, int position);
411 * Returns a pre-positioned cursor for the specified list position.
413 public Object getItem(int position) {
418 if (position >= start && position < end) {
419 int offset = position - start;
437 * Returns the item ID for the specified list position.
439 public long getItemId(int position) {
444 if (position >= start && position < end) {
445 int offset = position - start;
485 public boolean isEnabled(int position) {
490 if (position >= start && position < end) {
491 int offset = position - start;
508 protected boolean isEnabled(int partition, int position) {