Skip to content
Browse files

Refractored method names.

  • Loading branch information...
1 parent 0f45b55 commit df4708e468c43b0a99210229174a715f08dcceee @roughike committed
View
4 swipe-selector/src/main/java/com/roughike/swipeselector/SwipeAdapter.java
@@ -281,13 +281,13 @@ protected SwipeItem getSelectedItem() {
return mItems.get(mCurrentPosition);
}
- public void setSelectedItem(int position, boolean animate) {
+ public void selectItemAt(int position, boolean animate) {
if (position >= 0 && position < mItems.size()) {
mViewPager.setCurrentItem(position, animate);
}
}
- public void setSelectedItem(Object value, boolean animate) {
+ public void selectItemWithValue(Object value, boolean animate) {
for (int i = 0; i < mItems.size(); i++) {
if (mItems.get(i).value.equals(value)) {
mViewPager.setCurrentItem(i, animate);
View
16 swipe-selector/src/main/java/com/roughike/swipeselector/SwipeSelector.java
@@ -187,19 +187,19 @@ protected void dispatchRestoreInstanceState(SparseArray<Parcelable> container) {
dispatchThawSelfOnly(container);
}
- public void setSelectedItem(int position) {
- setSelectedItem(position, true);
+ public void selectItemAt(int position) {
+ selectItemAt(position, true);
}
- public void setSelectedItem(int position, boolean animate) {
- mAdapter.setSelectedItem(position, animate);
+ public void selectItemAt(int position, boolean animate) {
+ mAdapter.selectItemAt(position, animate);
}
- public void setSelectedItem(Object value) {
- setSelectedItem(value, true);
+ public void selectItemWithValue(Object value) {
+ selectItemWithValue(value, true);
}
- public void setSelectedItem(Object value, boolean animate) {
- mAdapter.setSelectedItem(value, animate);
+ public void selectItemWithValue(Object value, boolean animate) {
+ mAdapter.selectItemWithValue(value, animate);
}
}

0 comments on commit df4708e

Please sign in to comment.
Something went wrong with that request. Please try again.