addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblightning-boltlinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstar-shapestartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

Re: [blrdroid] Viewpager Problem

From: Ankit K.
Sent on: Monday, February 2, 2015, 4:15 PM
That toot I already tried..
But after u all replied, i tried it again.
But Its not working :(








On Mon, Feb 2, 2015 at 3:55 PM, Aman Alam <[address removed]> wrote:
Check this : http://stackoverflow.com/a/11075663/243709

Basically detect when the fragment in your viewpager becomes visible, and start the video.
Pause the video when it is not visible.

-Aman

On Mon, Feb 2, 2015 at 3:34 PM, Ankit Kumar <[address removed]> wrote:
Hi All,
I implemented ViewPager with Fragments.
I am playing video on fragment on click on videoviw.
evrything is working fine...
But the problem is when I swipe to next fragment(page), Video on left paf=ger is still playing..
I want it to pause or stop if fragment is not visible.
I tried to setOffScreenPageLimit(0), But this is also not working.
I created my CustomViewPAger Class and extended my activity to that CustomViewPager and I put DEFAULT_OFFSCREEN_PAGES =0, But his is also not working.

If Anybody knows how to resolve it , please help me to figure out this.

Thanks in advance.
(If thr are mistakes in mail, plz forgive me)




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Ankit Kumar ([address removed]) from The Bangalore Android User Group - [ B.A.U.G ].
To learn more about Ankit Kumar, visit his/her member profile
To report this message or block the sender, please click here
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]



--
Impossible is Nothing 

Aman Alam
Co-Founder & Chief Droid
Bangalore, IN

@amanalam
in.linkedin.com/in/amanalam

Not sent from an iPad / iPhone / BlackBerry
Just from a good old PC.




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Aman Alam ([address removed]) from The Bangalore Android User Group - [ B.A.U.G ].
To learn more about Aman Alam, visit his/her member profile
To report this message or block the sender, please click here
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]



--
Software Engineer,
Interaction One, Bangalore
[masked]


People in this
group are also in: