Last active
August 29, 2015 14:09
-
-
Save leelei/201df22046e23879dcbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mSwipeRefreshLayout.setProgressViewOffset(false, 0, | |
(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24, getResources().getDisplayMetrics())); | |
//Another workaround, getting the ActionBar size at run-time: | |
TypedValue typed_value = new TypedValue(); | |
getTheme().resolveAttribute(android.support.v7.appcompat.R.attr.actionBarSize, typed_value, true); | |
swipe_refresh_layout.setProgressViewOffset(false, 0, getResources().getDimensionPixelSize(typed_value.resourceId)); | |
//Another workaround might help | |
handler.postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
initiateRefresh(); | |
} | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment