forked from mirror/monocles_chat_clean
update fork #128
2 changed files with 17 additions and 0 deletions
Hide/show System UI on story pause/resume
commit
f3a1f8fe19
|
|
@ -51,6 +51,10 @@ public class StoryFragment extends Fragment {
|
|||
|
||||
public interface OnStoryInteractionListener {
|
||||
void onNextStory();
|
||||
|
||||
void pauseStory();
|
||||
|
||||
void resumeStory();
|
||||
}
|
||||
|
||||
public static StoryFragment newInstance(String url, String mimeType, ArrayList<String> urls) {
|
||||
|
|
@ -241,6 +245,7 @@ public class StoryFragment extends Fragment {
|
|||
if (currentAnimator != null && currentAnimator.isRunning()) {
|
||||
currentAnimator.pause();
|
||||
}
|
||||
mListener.pauseStory();
|
||||
pauseVideo();
|
||||
}
|
||||
|
||||
|
|
@ -248,6 +253,7 @@ public class StoryFragment extends Fragment {
|
|||
if (currentAnimator != null && currentAnimator.isPaused()) {
|
||||
currentAnimator.resume();
|
||||
}
|
||||
mListener.resumeStory();
|
||||
resumeVideo();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ public class StoryViewActivity extends XmppActivity implements StoryFragment.OnS
|
|||
|
||||
@Override
|
||||
public void onNextStory() {
|
||||
showSystemUi();
|
||||
if (viewPager.getCurrentItem() < urls.size() - 1) {
|
||||
viewPager.setCurrentItem(viewPager.getCurrentItem() + 1);
|
||||
} else {
|
||||
|
|
@ -305,4 +306,14 @@ public class StoryViewActivity extends XmppActivity implements StoryFragment.OnS
|
|||
invalidateOptionsMenu();
|
||||
refreshUi();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pauseStory() {
|
||||
hideSystemUi();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeStory() {
|
||||
showSystemUi();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue