How to set the orientation of the views under the "Gesture" to "none"

I am trying to set the orientation of the views under GestureOverlay to none. At this point, I can set the orientation both vertically and horizontally. However, for my application, I also do not want to, for this I need to set the value to none.

The article for gesture APIs says the following:

Orientation: Indicates the scrolling orientation of the views below. In this case, the scrolls of the list are vertical, which means that any horizontal gestures (for example, action_delete) can be immediately recognized as a gesture. Gestures that start with a vertical strike contain at least one horizontal component to be recognized. In other words, a simple vertical line cannot be a recognized gesture, since it will conflict with scrolling.

And above, it shows this piece of code displaying the android: orientation as vertical.

<android.gesture.GestureOverlayView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gestures"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

android:gestureStrokeType="multiple"
android:eventsInterceptionEnabled="true"
android:orientation="vertical">

After searching the Internet, I found this code snippet for an Android theme that uses android: orientation = "none"

, GestureOverlay, , , XML : : : ( "" "" ). :

    <android.gesture.GestureOverlayView
android:id="@+id/gestures_alpha"
android:layout_width="fill_parent" 
android:layout_height="0dip"
android:layout_weight="1.0"
android:gestureStrokeType="multiple"
android:fadeOffset="2000"
android:orientation="none"/>

- , SDK. SDK 7 (2.1.1).

+1
2

android:orientation="none" Replicant Android. , , , - , .

+1

, , GestureOverlayView. :

gestureOverlayView.setOrientation(GestureOverlayView.ORIENTATION_VERTICAL);
gestureOverlayView.setGestureStrokeAngleThreshold(90); 
0

Source: https://habr.com/ru/post/1787936/


All Articles