Skip to content

Commit

Permalink
Added more callback functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Weizhou He authored and Weizhou He committed Jul 27, 2015
1 parent 7fe1b6a commit cd4bfa7
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions demo/demo.iml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
Expand All @@ -82,10 +84,14 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="nineoldandroids-2.4.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
<orderEntry type="module" module-name="lib" exported="" />
</component>
</module>
10 changes: 10 additions & 0 deletions demo/src/main/java/com/captainhwz/demo/content/ListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,14 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public boolean checkCanDoRefresh(MaterialHeaderLayout frame, View content, View header) {
return DefaultContentHandler.checkContentCanBePulledDown(frame, listView, header);
}

@Override
public void onChange(float ratio, float offsetY) {

}

@Override
public void onOffsetCalculated(int totalOffset) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,14 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public boolean checkCanDoRefresh(MaterialHeaderLayout frame, View content, View header) {
return DefaultContentHandler.checkContentCanBePulledDown(frame, view, header);
}

@Override
public void onChange(float ratio, float offsetY) {

}

@Override
public void onOffsetCalculated(int totalOffset) {

}
}
10 changes: 10 additions & 0 deletions demo/src/main/java/com/captainhwz/demo/content/ScrollFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public boolean checkCanDoRefresh(MaterialHeaderLayout frame, View content, View header) {
return DefaultContentHandler.checkContentCanBePulledDown(frame, scrollView, header);
}

@Override
public void onChange(float ratio, float offsetY) {

}

@Override
public void onOffsetCalculated(int totalOffset) {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ public boolean checkCanDoRefresh(MaterialHeaderLayout frame, View content, View
return adapter.getItem(viewPager.getCurrentItem()).checkCanDoRefresh(frame, content, header);
}

@Override
public void onChange(float ratio, float offsetY) {

}

@Override
public void onOffsetCalculated(int totalOffset) {

}

static class MyViewPagerAdapter extends FragmentStatePagerAdapter {

List<BaseFragment> mFragmentList;
Expand Down

0 comments on commit cd4bfa7

Please sign in to comment.