JackKirk Well-Known Member Licensed User Longtime User Jan 3, 2017 #1 Hi, I want to know the long click timeout in my app. It would appear that java has a function getLongPressTimeout that will do the job. But this requires JavaObject or Reflection library stuff that is beyond me. Searching the forums for "getLongPressTimeout" yields nothing - which is surprising. Is there any brainiac out there who could throw me the clue? Thanks in anticipation...
Hi, I want to know the long click timeout in my app. It would appear that java has a function getLongPressTimeout that will do the job. But this requires JavaObject or Reflection library stuff that is beyond me. Searching the forums for "getLongPressTimeout" yields nothing - which is surprising. Is there any brainiac out there who could throw me the clue? Thanks in anticipation...
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2017 #2 B4X: Dim jo As JavaObject jo.InitializeStatic("android.view.ViewConfiguration") Log(jo.RunMethod("getLongPressTimeout", Null)) Upvote 0
B4X: Dim jo As JavaObject jo.InitializeStatic("android.view.ViewConfiguration") Log(jo.RunMethod("getLongPressTimeout", Null))
JackKirk Well-Known Member Licensed User Longtime User Jan 3, 2017 #3 4 hour response time - brilliant - thanks Erel One of the reasons I called for help was that when I googled "getLongPressTimeout" I found: https://developer.android.com/reference/android/view/ViewConfiguration.html which says about ViewConfiguration: This constructor was deprecated in API level 3. Use get(android.content.Context) instead. Click to expand... and I was not sure what that meant for code longevity - any comment? Last edited: Jan 3, 2017 Upvote 0
4 hour response time - brilliant - thanks Erel One of the reasons I called for help was that when I googled "getLongPressTimeout" I found: https://developer.android.com/reference/android/view/ViewConfiguration.html which says about ViewConfiguration: This constructor was deprecated in API level 3. Use get(android.content.Context) instead. Click to expand... and I was not sure what that meant for code longevity - any comment?
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2017 #4 getLongPressTimeout is a static method. You don't call any constructor or get an instance. Upvote 0