Skip to content

Commit

Permalink
Fix Warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zhpanvip committed Apr 17, 2021
1 parent c765af3 commit 32e74a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
import com.zhpan.indicator.annotation.AIndicatorSlideMode;
import com.zhpan.indicator.annotation.AIndicatorStyle;
import com.zhpan.indicator.base.IIndicator;
import com.zhpan.indicator.enums.IndicatorOrientation;
import com.zhpan.indicator.option.IndicatorOptions;

import java.util.ArrayList;
import java.util.List;

import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import static com.zhpan.bannerview.BaseBannerAdapter.MAX_VALUE;
import static com.zhpan.bannerview.constants.IndicatorGravity.CENTER;
import static com.zhpan.bannerview.constants.IndicatorGravity.END;
Expand Down Expand Up @@ -930,7 +928,6 @@ public void setCurrentItem(int item, boolean smoothScroll) {
/**
* Set Page Style for Banner
* {@link PageStyle#NORMAL}
* {@link PageStyle#MULTI_PAGE}
*
* @return BannerViewPager
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ public static void reflectLayoutManager(ViewPager2 viewPager2, int scrollDuratio
layoutManager.setAccessible(true);
layoutManager.set(mScrollEventAdapter, scrollDurationManger);
}
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,12 @@ public void onInitializeAccessibilityNodeInfo(@NonNull RecyclerView.Recycler rec
protected void calculateExtraLayoutSpace(@NonNull RecyclerView.State state,
@NonNull int[] extraLayoutSpace) {
try {
Method method = mParent.getClass().getDeclaredMethod("calculateExtraLayoutSpace", state.getClass(), extraLayoutSpace.getClass());
Method method = mParent.getClass()
.getDeclaredMethod("calculateExtraLayoutSpace",
state.getClass(), extraLayoutSpace.getClass());
method.setAccessible(true);
method.invoke(mParent, state, extraLayoutSpace);
} catch (NoSuchMethodException e) {
e.printStackTrace();
BannerUtils.log(e.getMessage());
} catch (IllegalAccessException e) {
e.printStackTrace();
BannerUtils.log(e.getMessage());
} catch (InvocationTargetException e) {
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
BannerUtils.log(e.getMessage());
}
Expand Down

0 comments on commit 32e74a1

Please sign in to comment.