I need to nest some touch listeners. For example, I have a ViewGroup that will have the following listeners: onItemClick, onLongItemClick, and onTouch.EV == move.
Elements within the view group will also have onClick.
In my tests, both sets of listeners work independently, but not interdependently. Is there a way to connect groups of listeners?
Thanks ~ Aedona
I'm not sure, but maybe you can send a touch event from the root view to its child view (starting from the action).
@Override public boolean onTouchEvent(MotionEvent event) { if (ChildView.dispatchTouchEvent(event)) return true; else return false; }
after the user clicked the button, send the touch event back to root mode.
. , . , ViewGroup, , . false , , true , .
, ViewGroup. , ViewGroup , , .
Source: https://habr.com/ru/post/1795304/More articles:Record high-quality video using Flash and Red5 Media Server - flashAccess the list item specified by the iterator - c ++Export XPCOM component to javascript on web page - javascriptIterator exception bypass error in Visual C ++ 2010 - iteratorProblem with importing a module and NameError: the global name 'module' is undefined - pythonSuggestions for troubleshooting this Perl DBD :: mysql error message? - mysqlSmarty caching (with dynamic content) - phphttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1795307/scan-subversion-repository-for-active-branches&usg=ALkJrhjO8_tAb0QC1QMLtvTETiNYXqvd7QThe task of installing selectedvalue for combobox in xaml - .netDynamically remove an exception on a field in a django model form - django-formsAll Articles