Skip to content

Commit

Permalink
Merge pull request emilsjolander#190 from kleemedia/gozio
Browse files Browse the repository at this point in the history
Fix TargetApi settings from ListView delegates
  • Loading branch information
emilsjolander committed Oct 7, 2013
2 parents 7bb7057 + dc930d0 commit ce43700
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ public void smoothScrollByOffset(int offset) {
mList.smoothScrollByOffset(offset);
}

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@TargetApi(Build.VERSION_CODES.FROYO)
public void smoothScrollToPosition(int position) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
mList.smoothScrollToPosition(position);
Expand Down Expand Up @@ -663,15 +663,11 @@ public int getLastVisiblePosition() {
return mList.getLastVisiblePosition();
}

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void setChoiceMode(int choiceMode) {
requireSdkVersion(Build.VERSION_CODES.HONEYCOMB);
mList.setChoiceMode(choiceMode);
}

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void setItemChecked(int position, boolean value) {
requireSdkVersion(Build.VERSION_CODES.HONEYCOMB);
mList.setItemChecked(position, value);
}

Expand All @@ -681,21 +677,17 @@ public int getCheckedItemCount() {
return mList.getCheckedItemCount();
}

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@TargetApi(Build.VERSION_CODES.FROYO)
public long[] getCheckedItemIds() {
requireSdkVersion(Build.VERSION_CODES.HONEYCOMB);
requireSdkVersion(Build.VERSION_CODES.FROYO);
return mList.getCheckedItemIds();
}

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public int getCheckedItemPosition() {
requireSdkVersion(Build.VERSION_CODES.HONEYCOMB);
return mList.getCheckedItemPosition();
}

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public SparseBooleanArray getCheckedItemPositions() {
requireSdkVersion(Build.VERSION_CODES.HONEYCOMB);
return mList.getCheckedItemPositions();
}

Expand Down

0 comments on commit ce43700

Please sign in to comment.