adbayb / react-native-android-kit

:package: Android Native Kit for React-Native
MIT License
110 stars 20 forks source link

Programmatically set the current active tab in TabLayoutAndroid? #12

Open tituswoo opened 8 years ago

tituswoo commented 8 years ago

I'm really diggin' the TabLayoutAndroid component. However, there doesn't seem to be a way to programmatically set the active tab in JS.

E.g., I would love to be able to do something along the lines of:

<TabLayoutAndroid selectedTab="kittensTab">
   <TabAndroid id="allPicturesTab" />
   <TabAndroid id="kittensTab" />
   <TabAndroid id="dogsTab" />
</TabLayoutAndroid>

Thanks again! :)

adbayb commented 8 years ago

Hello @tituswoo,

Thank you for your feedback. Yes this approach is quite interesting. For next release (after holidays), it will be implemented :)