@@ -42,6 +42,37 @@ public unsafe void SetEnabled (bool enabled)
42
42
43
43
}
44
44
}
45
+
46
+
47
+ private static IntPtr id_isNestedScrollingEnabled = IntPtr . Zero ;
48
+ private static IntPtr id_setNestedScrollingEnabled = IntPtr . Zero ;
49
+
50
+ public unsafe virtual bool NestedScrollingEnabled {
51
+ [ Register ( "isNestedScrollingEnabled" , "()Z" , "GetIsNestedScrollingEnabledHandler" ) ]
52
+ get {
53
+ if ( id_isNestedScrollingEnabled == IntPtr . Zero ) {
54
+ id_isNestedScrollingEnabled = JNIEnv . GetMethodID ( class_ref , "isNestedScrollingEnabled" , "()Z" ) ;
55
+ }
56
+ if ( base . GetType ( ) == ThresholdType ) {
57
+ return JNIEnv . CallBooleanMethod ( base . Handle , id_isNestedScrollingEnabled ) ;
58
+ }
59
+ return JNIEnv . CallNonvirtualBooleanMethod ( base . Handle , ThresholdClass , JNIEnv . GetMethodID ( ThresholdClass , "isNestedScrollingEnabled" , "()Z" ) ) ;
60
+ }
61
+
62
+ [ Register ( "setNestedScrollingEnabled" , "(Z)V" , "GetSetNestedScrollingEnabledHandler" ) ]
63
+ set {
64
+ if ( id_setNestedScrollingEnabled == IntPtr . Zero ) {
65
+ id_setNestedScrollingEnabled = JNIEnv . GetMethodID ( class_ref , "setNestedScrollingEnabled" , "(Z)V" ) ;
66
+ }
67
+ JValue * ptr = stackalloc JValue [ 1 ] ;
68
+ * ptr = new JValue ( value ) ;
69
+ if ( base . GetType ( ) == ThresholdType ) {
70
+ JNIEnv . CallVoidMethod ( base . Handle , id_setNestedScrollingEnabled , ptr ) ;
71
+ return ;
72
+ }
73
+ JNIEnv . CallNonvirtualVoidMethod ( base . Handle , ThresholdClass , JNIEnv . GetMethodID ( ThresholdClass , "setNestedScrollingEnabled" , "(Z)V" ) , ptr ) ;
74
+ }
75
+ }
45
76
}
46
77
}
47
78
0 commit comments