|
1 | 1 | using System;
|
| 2 | +using Android.Runtime; |
| 3 | + |
2 | 4 | namespace Android.Support.V7.Widget
|
3 |
| - //.RecyclerView.RequestDisallowInterceptTouchEventEventArgs |
4 | 5 | {
|
5 |
| - public partial class RecyclerView |
6 |
| - { |
7 |
| - public partial class InterceptTouchEventEventArgs |
8 |
| - { |
9 |
| - public RecyclerView RecyclerView { |
10 |
| - get { return this.Rv; } |
11 |
| - } |
12 |
| - } |
13 |
| - |
14 |
| - public partial class RequestDisallowInterceptTouchEventEventArgs |
15 |
| - { |
16 |
| - public bool Disallow |
17 |
| - { |
18 |
| - get { return this.DisallowIntercept; } |
19 |
| - } |
20 |
| - } |
21 |
| - |
22 |
| - public partial class TouchEventEventArgs |
23 |
| - { |
24 |
| - public RecyclerView RecyclerView |
25 |
| - { |
26 |
| - get { return this.Rv; } |
27 |
| - } |
28 |
| - } |
29 |
| - } |
| 6 | + public partial class RecyclerView |
| 7 | + { |
| 8 | + public partial class InterceptTouchEventEventArgs |
| 9 | + { |
| 10 | + public RecyclerView RecyclerView { |
| 11 | + get { return this.Rv; } |
| 12 | + } |
| 13 | + } |
| 14 | + |
| 15 | + public partial class RequestDisallowInterceptTouchEventEventArgs |
| 16 | + { |
| 17 | + public bool Disallow { |
| 18 | + get { return this.DisallowIntercept; } |
| 19 | + } |
| 20 | + } |
| 21 | + |
| 22 | + public partial class TouchEventEventArgs |
| 23 | + { |
| 24 | + public RecyclerView RecyclerView { |
| 25 | + get { return this.Rv; } |
| 26 | + } |
| 27 | + } |
| 28 | + |
| 29 | + private static IntPtr id_isNestedScrollingEnabled = IntPtr.Zero; |
| 30 | + private static IntPtr id_setNestedScrollingEnabled = IntPtr.Zero; |
| 31 | + |
| 32 | + public unsafe virtual bool NestedScrollingEnabled { |
| 33 | + [Register("isNestedScrollingEnabled", "()Z", "GetIsNestedScrollingEnabledHandler")] |
| 34 | + get { |
| 35 | + if (id_isNestedScrollingEnabled == IntPtr.Zero) { |
| 36 | + id_isNestedScrollingEnabled = JNIEnv.GetMethodID(class_ref, "isNestedScrollingEnabled", "()Z"); |
| 37 | + } |
| 38 | + if (base.GetType() == ThresholdType) { |
| 39 | + return JNIEnv.CallBooleanMethod(base.Handle, id_isNestedScrollingEnabled); |
| 40 | + } |
| 41 | + return JNIEnv.CallNonvirtualBooleanMethod(base.Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "isNestedScrollingEnabled", "()Z")); |
| 42 | + } |
| 43 | + |
| 44 | + [Register("setNestedScrollingEnabled", "(Z)V", "GetSetNestedScrollingEnabledHandler")] |
| 45 | + set { |
| 46 | + if (id_setNestedScrollingEnabled == IntPtr.Zero) { |
| 47 | + id_setNestedScrollingEnabled = JNIEnv.GetMethodID(class_ref, "setNestedScrollingEnabled", "(Z)V"); |
| 48 | + } |
| 49 | + JValue* ptr = stackalloc JValue[1]; |
| 50 | + *ptr = new JValue(value); |
| 51 | + if (base.GetType() == ThresholdType) { |
| 52 | + JNIEnv.CallVoidMethod(base.Handle, id_setNestedScrollingEnabled, ptr); |
| 53 | + return; |
| 54 | + } |
| 55 | + JNIEnv.CallNonvirtualVoidMethod(base.Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "setNestedScrollingEnabled", "(Z)V"), ptr); |
| 56 | + } |
| 57 | + } |
| 58 | + |
| 59 | + |
| 60 | + } |
30 | 61 | }
|
0 commit comments