1

Fragment fadeout on horizontal swipe

view story
linux-howto

http://stackoverflow.com – In my game I have a Fragment in fullscreen that pops to indicate which player have to play. The player must swipe the Fragment horizontaly more than half screen (left or right), so he could play.. Here's my Fragment code: public class PopPlayerFragment extends Fragment implements View.OnTouchListener{ [...] private float mMaxSlide; private float mInitialMotionX; private float mActualMotionX; private float mLastMotionX; [...] public View onCreateView (LayoutInflater inflater, ViewGroup container, [...]){ View v = inflater.inflate(R.layout.pfragment, container, false); mMaxSlide = get (HowTos)