Skip to content

Commit

Permalink
gradle props
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanWang committed Mar 29, 2017
2 parents b601439 + 3014fb0 commit 57c9628
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
4 changes: 1 addition & 3 deletions sample/sample.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":sample" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":sample" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
Expand All @@ -25,7 +25,6 @@
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
Expand Down Expand Up @@ -138,6 +137,5 @@
<orderEntry type="library" exported="" name="iconics-core-2.8.2" level="project" />
<orderEntry type="module" module-name="swiperecyclerview" exported="" />
<orderEntry type="library" exported="" name="android-android-25" level="project" />
<orderEntry type="library" exported="" name="materialize-1.0.0" level="project" />
</component>
</module>
2 changes: 2 additions & 0 deletions sample/src/main/res/xml/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<version title="v0.2"/>
<item text="Fixed CheckboxItem blinking" />
<item text="Added PairItems template" />
<item text="Add silent refresh listener" />
<item text="Update dependencies" />

<version title="v0.1"/>
<item text="Initial" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class SwipeRecyclerView extends FrameLayout implements SwipeRefreshBase.I

private ISwipeRecycler.OnRefreshListener mRefreshListener;
private ISwipeRecycler.OnRefreshStatus mRefreshStatus = getDefaultRefreshStatus();
private SilentRefreshListener mSilentRefreshListener = getDefaultSilentRefreshListener();

/**
* Generate default refresh callbacks
Expand Down Expand Up @@ -216,6 +217,36 @@ public SwipeRecyclerView refresh() {
return this;
}

/**
* Variant of refresh where the view is updated without animations and the refresh indicator
*/
public SwipeRecyclerView refreshSilently() {
mSilentRefreshListener.onSilentRefresh();
return this;
}

public interface SilentRefreshListener {
void onSilentRefresh();
}

public SilentRefreshListener getDefaultSilentRefreshListener() {
return new SilentRefreshListener() {
@Override
public void onSilentRefresh() {
onRefresh();
}
};
}

/**
* Variant of refresh where the view is updated without animations and the refresh indicator
*/
public SwipeRecyclerView setSilentRefreshListener(@Nullable SilentRefreshListener listener) {
if (listener != null) mSilentRefreshListener = listener;
else mSilentRefreshListener = getDefaultSilentRefreshListener();
return this;
}

@Override
public boolean shouldConsumeTouch(MotionEvent ev) {
return !mRecycler.canScrollVertically(-1);
Expand Down
3 changes: 1 addition & 2 deletions swiperecyclerview/swiperecyclerview.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":swiperecyclerview" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":swiperecyclerview" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
Expand All @@ -26,7 +26,6 @@
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
Expand Down

0 comments on commit 57c9628

Please sign in to comment.