How do I enable touch on multiple buttons simultaneously in react native?

后端 未结 4 2086
旧巷少年郎
旧巷少年郎 2020-12-16 02:02

I need that when I am touching and holding one button then I should also be able to touch on the button 1.

4条回答
  •  被撕碎了的回忆
    2020-12-16 02:42

    This problem can easily be resolved using onTouchStart, onTouchEnd props of View component without using gesture responder methods.

    So the modified code will look like

    
    
      this.console("Button 2 Clicked")}>
        BUTTON 2
      
    
      this.console('Button 1 pressed')}
        onTouchEnd={()=>this.console('Button 1 released')}>
          BUTTON 1
      
    
    
    

提交回复
热议问题