RayLee Member Licensed User Longtime User Dec 26, 2013 #1 In java, it could be set Code: Copy scrollView1.setHorizontalFadingEdgeEnabled(false) but i use the code: Code: Copy Dim reItem As Reflector reItem.Target = PnMainContainer ' PnMainContainer is a scrollview object reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.Boolean") It causes some errors: java.lang.NoSuchMethodException: setHorizontalFadingEdgeEnabled How can I invoke this method?
In java, it could be set Code: Copy scrollView1.setHorizontalFadingEdgeEnabled(false) but i use the code: Code: Copy Dim reItem As Reflector reItem.Target = PnMainContainer ' PnMainContainer is a scrollview object reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.Boolean") It causes some errors: java.lang.NoSuchMethodException: setHorizontalFadingEdgeEnabled How can I invoke this method?
klaus Expert Licensed User Longtime User Dec 26, 2013 #2 This line is wrong Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.Boolean") It must be Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.boolean") Upvote 0
This line is wrong Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.Boolean") It must be Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.boolean")
DonManfred Expert Licensed User Longtime User Dec 26, 2013 #3 klaus said: This line is wrong Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.Boolean") Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.boolean") Click to expand... Both lines are identic. And this should help to not change the line? ;-) Upvote 0
klaus said: This line is wrong Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.Boolean") Code: Copy reItem.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.boolean") Click to expand... Both lines are identic. And this should help to not change the line? ;-)
klaus Expert Licensed User Longtime User Dec 26, 2013 #4 The first line has java.lang.Boolean the second has java.lang.boolean The first throws an error not the second one. Java is case sensitive. Upvote 0
The first line has java.lang.Boolean the second has java.lang.boolean The first throws an error not the second one. Java is case sensitive.
DonManfred Expert Licensed User Longtime User Dec 26, 2013 #5 Ahh, ok. I didn´t knew that. Thanx. Upvote 0
RayLee Member Licensed User Longtime User Dec 27, 2013 #6 Thank you! However after invoked, I found it could not remove the FadingEdge . :>_<: Attachments DesignIt.zip DesignIt.zip 478 KB · Views: 382 Upvote 0
RayLee Member Licensed User Longtime User Dec 27, 2013 #7 klaus said: The first line has java.lang.Boolean the second has java.lang.boolean The first throws an error not the second one. Java is case sensitive. Click to expand... After invoked, but FadingEdge is still here... Upvote 0
klaus said: The first line has java.lang.Boolean the second has java.lang.boolean The first throws an error not the second one. Java is case sensitive. Click to expand... After invoked, but FadingEdge is still here...
barx Well-Known Member Licensed User Longtime User Dec 27, 2013 #8 I think your looking for the overscroll mode Code: Copy reitem.RunMethod2("setVerticalScrollBarEnabled", False, "java.lang.boolean") reItem.RunMethod2("setOverScrollMode", 2, "java.lang.int" ) Upvote 0
I think your looking for the overscroll mode Code: Copy reitem.RunMethod2("setVerticalScrollBarEnabled", False, "java.lang.boolean") reItem.RunMethod2("setOverScrollMode", 2, "java.lang.int" )
klaus Expert Licensed User Longtime User Dec 27, 2013 #9 It depends on what fading you are speaking of and the Android version. There are two fadings: - a permanent fading on the edges which remain when the scroll position is not at the beginning or at the end. - a dynamic fading which appears when you reach either the beginning or the end. The permanent fading is removed with r.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.boolean") or r.RunMethod2("setVertivalFadingEdgeEnabled", False, "java.lang.boolean") but the dynamic fading remains. To remove both fadings, as reported by barx, use . r.RunMethod2("setOverScrollMode", 2, "java.lang.int") On my device with Android 2.3.3 the permanent fading is True by default. On my device with Android 4.2.2 the permanent fading is False by default. Attached a small test program. In the picture you see on the top permanent fading is True and on the bottom permanent fading is False. Attachments ScrollViewFading.png 6.4 KB · Views: 463 TestScrollViewScrollBars.zip TestScrollViewScrollBars.zip 6 KB · Views: 359 Last edited: Dec 27, 2013 Upvote 0
It depends on what fading you are speaking of and the Android version. There are two fadings: - a permanent fading on the edges which remain when the scroll position is not at the beginning or at the end. - a dynamic fading which appears when you reach either the beginning or the end. The permanent fading is removed with r.RunMethod2("setHorizontalFadingEdgeEnabled", False, "java.lang.boolean") or r.RunMethod2("setVertivalFadingEdgeEnabled", False, "java.lang.boolean") but the dynamic fading remains. To remove both fadings, as reported by barx, use . r.RunMethod2("setOverScrollMode", 2, "java.lang.int") On my device with Android 2.3.3 the permanent fading is True by default. On my device with Android 4.2.2 the permanent fading is False by default. Attached a small test program. In the picture you see on the top permanent fading is True and on the bottom permanent fading is False.
RayLee Member Licensed User Longtime User Dec 27, 2013 #10 Thanks a lot! With your help, it works well ~ Upvote 0
barx Well-Known Member Licensed User Longtime User Dec 27, 2013 #11 Nothing is ever straight forward lol. I wasn't aware of this second fade. Put me back on the n00b pile. Upvote 0
Nothing is ever straight forward lol. I wasn't aware of this second fade. Put me back on the n00b pile.
klaus Expert Licensed User Longtime User Dec 27, 2013 #12 Me too, I discovered it and also the differences depending on the Android version when I played with the different functions. I had never looked at setOverScrollMode before I saw your post. I have updated my post with your solution. Upvote 0
Me too, I discovered it and also the differences depending on the Android version when I played with the different functions. I had never looked at setOverScrollMode before I saw your post. I have updated my post with your solution.