Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null annotations for helper #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.everything.android.ui.overscroll;

import androidx.annotation.NonNull;
import androidx.viewpager.widget.ViewPager;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
Expand Down Expand Up @@ -34,7 +35,7 @@ public class OverScrollDecoratorHelper {
*
* @return The over-scroll effect 'decorator', enabling further effect configuration.
*/
public static IOverScrollDecor setUpOverScroll(RecyclerView recyclerView, int orientation) {
public static IOverScrollDecor setUpOverScroll(@NonNull RecyclerView recyclerView, int orientation) {
switch (orientation) {
case ORIENTATION_HORIZONTAL:
return new HorizontalOverScrollBounceEffectDecorator(new RecyclerViewOverScrollDecorAdapter(recyclerView));
Expand All @@ -45,19 +46,19 @@ public static IOverScrollDecor setUpOverScroll(RecyclerView recyclerView, int or
}
}

public static IOverScrollDecor setUpOverScroll(ListView listView) {
public static IOverScrollDecor setUpOverScroll(@NonNull ListView listView) {
return new VerticalOverScrollBounceEffectDecorator(new AbsListViewOverScrollDecorAdapter(listView));
}

public static IOverScrollDecor setUpOverScroll(GridView gridView) {
public static IOverScrollDecor setUpOverScroll(@NonNull GridView gridView) {
return new VerticalOverScrollBounceEffectDecorator(new AbsListViewOverScrollDecorAdapter(gridView));
}

public static IOverScrollDecor setUpOverScroll(ScrollView scrollView) {
public static IOverScrollDecor setUpOverScroll(@NonNull ScrollView scrollView) {
return new VerticalOverScrollBounceEffectDecorator(new ScrollViewOverScrollDecorAdapter(scrollView));
}

public static IOverScrollDecor setUpOverScroll(HorizontalScrollView scrollView) {
public static IOverScrollDecor setUpOverScroll(@NonNull HorizontalScrollView scrollView) {
return new HorizontalOverScrollBounceEffectDecorator(new HorizontalScrollViewOverScrollDecorAdapter(scrollView));
}

Expand All @@ -70,7 +71,7 @@ public static IOverScrollDecor setUpOverScroll(HorizontalScrollView scrollView)
*
* @return The over-scroll effect 'decorator', enabling further effect configuration.
*/
public static IOverScrollDecor setUpStaticOverScroll(View view, int orientation) {
public static IOverScrollDecor setUpStaticOverScroll(@NonNull View view, int orientation) {
switch (orientation) {
case ORIENTATION_HORIZONTAL:
return new HorizontalOverScrollBounceEffectDecorator(new StaticOverScrollDecorAdapter(view));
Expand All @@ -83,7 +84,7 @@ public static IOverScrollDecor setUpStaticOverScroll(View view, int orientation)
}
}

public static IOverScrollDecor setUpOverScroll(ViewPager viewPager) {
public static IOverScrollDecor setUpOverScroll(@NonNull ViewPager viewPager) {
return new HorizontalOverScrollBounceEffectDecorator(new ViewPagerOverScrollDecorAdapter(viewPager));
}

Expand Down