Add refresh and go to fab in GalleryListScene
This commit is contained in:
1 parent
3a01dd6b5b
commit
4edc7f082b
14 files changed
+396
-108
No files matched your search
@@ -33,6 +33,8 @@ public class ViewTransition {
|
||||
private Animator mAnimator1;
|
||||
private Animator mAnimator2;
|
||||
|
||||
private OnShowViewListener mOnShowViewListener;
|
||||
|
||||
public ViewTransition(View... views) {
|
||||
if (views.length < 2) {
|
||||
throw new IllegalStateException("You must pass view to ViewTransition");
|
||||
@@ -47,6 +49,10 @@ public class ViewTransition {
|
||||
showView(0, false);
|
||||
}
|
||||
|
||||
public void setOnShowViewListener(OnShowViewListener listener) {
|
||||
mOnShowViewListener = listener;
|
||||
}
|
||||
|
||||
public int getShownViewIndex() {
|
||||
return mShownView;
|
||||
}
|
||||
@@ -97,6 +103,10 @@ public class ViewTransition {
|
||||
}
|
||||
}
|
||||
|
||||
if (null != mOnShowViewListener) {
|
||||
mOnShowViewListener.onShowView(views[oldShownView], views[shownView]);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -128,4 +138,8 @@ public class ViewTransition {
|
||||
oa2.start();
|
||||
mAnimator2 = oa2;
|
||||
}
|
||||
|
||||
public interface OnShowViewListener {
|
||||
void onShowView(View hiddenView, View shownView);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user