why getEdgeFlags() always return 0

I want to detect the touch edge in onTouchEvent function for my view, but getEdgeFlags() always return 0 in my Nexus S 4.1.1, anyone can help me? thanks advance.

@Override public boolean onTouchEvent(MotionEvent event) { int edgeFlags = event.getEdgeFlags(); //edgeFlags alway 0! switch (edgeFlags) { case MotionEvent.EDGE_LEFT: Log.i("tag", "EDGE_LEFT"); break; case MotionEvent.EDGE_RIGHT: Log.i("tag", "EDGE_RIGHT"); break; case MotionEvent.EDGE_TOP: Log.i("tag", "EDGE_TOP"); break; case MotionEvent.EDGE_BOTTOM: Log.i("tag", "EDGE_BOTTOM"); break; default: Log.i("tag", "" + edgeFlags); break; } return super.onTouchEvent(event); }


I solved the problem with add four button to trigger four direction!


  • BoundingBoxes for Collision Detection overlapping and causing issues
  • Traverse directed edges recursively with OrientDB
  • Plot vector (or arc) onto a rose plot. MATLAB
  • What should be the return value of a custom function addEdge in a new class based on BGL?
  • flex-shrink behaviour in different browsers [duplicate]
  • Ways to remember and reuse previous query result in Neo4j
  • Winrt - Adjusting flyout according to where it appears
  • iOS6 JavaScript touchmove event pass through vertical scroll afterwards jQuery animate does not fire
  • IE9: Force IE9 browser mode and document mode
  • Did back key destroy an activity?
  • Java 2D array out of bounds error
  • Can I create EventListener in AS3 from one Object and remove it from another Object?
  • How do you download a image/png data URI in Edge?
  • Controlling tab space in a using CSS?
  • Spring Web Security locks Neo4j embedded database
  • Android Error: Binary XML file line #16: Error inflating class fragment when adding map fragment
  • “Yesod devel” fails with fromJust in devel.hs
  • Remove border around the color in an input[type=color] in Firefox?
  • Overriding window.location on Webbrowser Control
  • Android NDK vs iOS - performance issue [closed]
  • how to set id for each item in ListView
  • Galaxy S4 Android Custom Camera Issue
  • Android Activity.onWindowFocusChanged doesn't get called from within TabHost
  • zope_i18n_compile_mo_files doesn't work on a Zeo configuration
  • How can I extract results of aggregate queries in slick?
  • OOP Javascript - Is “get property” method necessary?
  • JQuery Internet Explorer and ajaxstop
  • PHPUnit_Framework_TestCase class is not available. Fix… - Makegood , Eclipse
  • PHP - How to update data to MySQL when click a radio button
  • Opengl-es onTouchEvents problem or a draw problem? [closed]
  • R: gsub and capture
  • Benchmarking RAM performance - UWP and C#
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Exception on Android 4.0 `android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode)`
  • Linking SubReports Without LinkChild/LinkMaster
  • Bitwise OR returns boolean when one of operands is nil
  • Sorting a 2D array using the second column C++
  • java string with new operator and a literal
  • Net Present Value in Excel for Grouped Recurring CF