Skip to content

Commit

Permalink
Attended comments about commit eb2b8b4.
Browse files Browse the repository at this point in the history
  • Loading branch information
nkeskinov committed Jul 16, 2014
1 parent 77b4596 commit e47e54a
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
public class SpiceListView extends ListView {

private final SpiceListScrollListener onScrollListener = new SpiceListScrollListener();

// ----------------------------
// --- CONSTRUCTORS
// ----------------------------
Expand All @@ -43,7 +45,8 @@ public SpiceListView(Context context) {

@Override
public void setOnScrollListener(OnScrollListener l) {
super.setOnScrollListener(new SpiceListScrollListener(l));
onScrollListener.setWrappedListener(l);
super.setOnScrollListener(onScrollListener);
}

@Override
Expand Down Expand Up @@ -71,22 +74,18 @@ public BaseSpiceArrayAdapter<?> getAdapter() {
// --- PRIVATE API
// ----------------------------
private void initialize() {
super.setOnScrollListener(new SpiceListScrollListener());
super.setOnScrollListener(onScrollListener);
}

// ----------------------------
// --- INNER CLASS API
// ----------------------------
private final class SpiceListScrollListener implements OnScrollListener {

private final OnScrollListener wrappedListener;

public SpiceListScrollListener() {
this.wrappedListener = null;
}
private OnScrollListener wrappedListener;

public SpiceListScrollListener(OnScrollListener wrappedListener) {
this.wrappedListener = wrappedListener;
private void setWrappedListener(OnScrollListener l) {
this.wrappedListener = l;
}

@Override
Expand Down

0 comments on commit e47e54a

Please sign in to comment.