简体   繁体   中英

How To Implement A Swipable Tab Host In Android

在此处输入图片说明

I want to make a tab host in such a way that if I swipe left inside the tab host, a new tab will appear from the right and pushes the rest towards the left. I want the new tab that would appear will be able to position itself properly. I want smooth transition effect in swiping, so can anyone give me idea on how to achieve this effect? any sample codes? or any useful links containing tutorials? I googled this up and sadly no result showing what I want.

One way that I could think of is applying a scroll view there that could only be scrolled horizontally. But one problem I am worrying is the automatic positioning of the item. How can I achieve that?

Please help. Many Thanks!

it seems that you are looking for ViewPager and PagTabStrip Example . google out on both topic and you will definitely find your ans.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM