AlbertBrand / react-native-android-tablayout

React Native Android TabLayout native component
141 stars 29 forks source link

Tablayout ScrollTo function #6

Closed shukerullah closed 8 years ago

shukerullah commented 8 years ago

how to scroll tablayout programatically?

Tablayout scroll back when I select page which is of the screen. Thanks

AlbertBrand commented 8 years ago

I think I see what you mean: when there are more tabs and tab scrolling is activated in the component, the tabs scroll back to the left position on every click. This probably has to do something with a measure or layout triggered by React Native. You shouldn't need to scroll the tabs yourselves. I'll have a look.

shukerullah commented 8 years ago

Thanks @AlbertBrand

AlbertBrand commented 8 years ago

It is caused by a TabLayout feature: you have to set the tabMode property to 'scrollable' to have properly scrolling tabs. Version 0.0.9 has support for it now, see the ScrollableTabLayout example on how to set the property.

shukerullah commented 8 years ago

@AlbertBrand thank you so much

shukerullah commented 8 years ago

Dear @AlbertBrand tab scrolling is not working when i set initial page position to the tab index which is off the screen.

qntnrbns commented 7 years ago

I am having the same issue, and I cant seem to find a work around.