[ANDROID] onPress Event for Tabs
See original GitHub issuereact-native, react and native-base version
native-base: “^2.3.1”, react: “16.0.0-alpha.12”, react-native : “0.47.1”,
Expected behaviour
How do call a function when Native base Tab Component is clicked / pressed.
Actual behaviour
onPress event not working in Tab component
Steps to reproduce (code snippet or screenshot)
<Container>
<Tabs style={{}} tabBarPosition="bottom" >
<Tab style={{}} heading='Network' onPress={() => console.log("tab1")}>
</Tab>
<Tab style={{}} heading='Jobs' onPress={() => console.log("tab2")}>
</Tab>
</Tabs>
</Container>
Screenshot of emulator/device
Is the bug present in both ios and android or in any one of them?
maybe a feature needed for ANDROID
Any other additional info which would help us debug the issue quicker.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Android TabWidget detect click on current tab - Stack Overflow
"I am trying to find way to be able to fire an onclick event on a tab when this tab is the current...
Read more >Input events overview - Android Developers
On Android, there's more than one way to intercept the events from a user's interaction with your application. When considering events ...
Read more >TabLayout | Android Developers
TabLayout provides a horizontal layout to display tabs. Population of the tabs to ... boolean, onInterceptTouchEvent(MotionEvent event).
Read more >Button | Android Developers
As a result, the system executes the code you write in onClick(View) ... android:contextClickable, Defines whether this view reacts to context click events....
Read more >UI events - Android Developers
Consuming certain ViewModel events in the UI might result in other UI state updates. For example, when showing transient messages on the screen ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ngoducduy https://github.com/skv-headless/react-native-scrollable-tab-view#props
@Naveen-ICARUS you can use
onChangeTab
prop of<Tabs/>
which can be used to detect a change in tab selection