You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by chris_d_k <ck...@christiankiefer.de> on 2016/05/05 19:26:33 UTC

Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Hi,

in many Andoid Apps like Facebook, Chrome, E-Mail, ... you can swipe down to
get a circle with shadow and a round arrow in it from below the action bar
to reload the current page when released in a "swiped" state... 

Is there something like this available "ready to use" for Flex as a
component, ane, ... ?

Kind regards

Christian



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: [Non-DoD Source] Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Posted by chris_d_k <ck...@christiankiefer.de>.
Thanks for this... but that should be for reloading just a list... I am
searching something to reload a view...
so I ended up in implementing it on my own (see below - only reacting in the
upper part of the view) but have on question left... What is the best way to
check if I am scrolling a list? Do I have to go through the event targets
parents... or is there an easier way...


private static const REFRESH_ICON_PERCENTAGE_MAX_POSITION:Number = .10;
        private var downPoint:Point;
        private var mouseMoveY:int;

        private function handleMouseDown(event:MouseEvent):void
        {
            if(!refreshIcon.parent && isReloadableView() && mouseY < height
* .2)
            {
                resetRefreshIconStartPosition();
                addMouseListeners();
                downPoint = new Point(mouseX, mouseY);
            }
        }

        private function handleMouseUp(event:MouseEvent):void
        {
            removeMouseListeners();
            removeRefreshIcon();
            if(refreshIcon.y >= getRefreshIconEndPosition())
            {
                dispatchEvent(new ReloadEvent(ReloadEvent.RELOAD, true));
            }
        }

        private function handleMouseLeave(event:Event):void
        {
            removeMouseListeners();
            removeRefreshIcon();
        }

        private function handleMouseMove(event:MouseEvent):void
        {
            if(hasMovedABit())
            {
                if(!refreshIcon.parent)
                {
                    addRefreshIconToNavigator();
                    mouseMoveY = mouseY;
                    resetRefreshIconStartPosition();
                }
                else
                {
                    refreshIcon.y = Math.min(-refreshIcon.height + (mouseY -
mouseMoveY), getRefreshIconEndPosition());
                    refreshIcon.alpha = Math.max(.2, refreshIcon.y /
(unscaledHeight * REFRESH_ICON_PERCENTAGE_MAX_POSITION));
                }
            }
            else
            {
                removeRefreshIcon();
            }
        }



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661p12710.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: [Non-DoD Source] Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Posted by quick6black <an...@gmail.com>.
that was the one, for some reason I thought he took down that blog. thanks
for posting



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661p12677.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: [Non-DoD Source] Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Posted by OK <OK...@edscha.com>.
quick6black wrote
> You might be able to find the source code on the internet somewhere.

http://www.riagora.com/2011/05/pull-down-to-refresh/




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661p12675.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: [Non-DoD Source] Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Posted by quick6black <an...@gmail.com>.
There was a blog about doing something similar, here is the youtube video of
the animation

https://www.youtube.com/watch?v=oS94A9a9B_Q

You might be able to find the source code on the internet somewhere. I was
able to do something similar using states. I can send you something if you
are interested.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661p12674.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: [Non-DoD Source] Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Posted by chris_d_k <ck...@christiankiefer.de>.
Someone any tipp on the question? And can anyone delete the conversation
about how to unscubscribe?

Christian



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661p12668.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

RE: [Non-DoD Source] Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Posted by Kessler CTR Mark J <ma...@usmc.mil>.
Send an email to [1] to unsubscribe from the users mailing list.


[1] users-unsubscribe@flex.apache.org
[2] http://flex.apache.org/community-mailinglists.html


-Mark


-----Original Message-----
From: Justin Ransom Dallas [mailto:justindallas@gmail.com]
Sent: Thursday, May 05, 2016 4:02 PM
To: users@flex.apache.org
Subject: [Non-DoD Source] Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Unsubscribe

Re: Visual effects for reloading data like in chrome browse, facebook, on mobile devices ...

Posted by Justin Ransom Dallas <ju...@gmail.com>.
Unsubscribe

On Thu, May 5, 2016 at 3:26 PM, chris_d_k <ck...@christiankiefer.de> wrote:

> Hi,
>
> in many Andoid Apps like Facebook, Chrome, E-Mail, ... you can swipe down
> to
> get a circle with shadow and a round arrow in it from below the action bar
> to reload the current page when released in a "swiped" state...
>
> Is there something like this available "ready to use" for Flex as a
> component, ane, ... ?
>
> Kind regards
>
> Christian
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>



-- 
Justin Dallas
Phone:814-880-5637