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.
Related
What I want to achieve?
I recorded a video of the Tab transition animation.
Video: https://www.dropbox.com/s/h8k5uy3z5gwbzoc/File%206-24-15%2C%2019%2015%2012.mov?dl=0
There are several flows I would like to describe below:
Centering the selected item in normal (I did this)
Transit the tab container when user scroll it up to the top. I thought it was a padding animation but it doesn't seem to the right way.
Transit the tab container back when user scroll it down.
Change the transparency along with the scroll. (I can almost do this by catching the scrolling event)
What I have tried?
I use this https://github.com/jpardogo/PagerSlidingTabStrip to achieve the center position of selected tab.
I'm using padding to transit the tab container but I think it's not the right way.
Still no code here, but I'll post it if it's helpful.
Please help!
Try new google design support library and go through the AppBar and it's layout_scrollFlags options for various mode.
https://github.com/florent37/MaterialViewPager
https://github.com/naman14/PlayNewsStandDemo
This guys made the exact mock of GooglePlayNewStand.
I am trying to get an effect that is similar to navigation drawer only the swipe would come from the top of the screen, much like the notifaction center in android:
this is what i need to do:
what i want is for a specific fragment to always be there and can be brougt to the view by pulling down, anyone knows how to do that?
Eventually mennaged to get this effect using this awsome and grate library!:
https://github.com/umano/AndroidSlidingUpPanel
Free to user and amasingly effective.
I want to make a layout where you can swipe right and left to change the view content. However, I don't need to change the layout, I just need to change the texts in the TextViews and some visibility changes when swiping right or left. Do I need a ViewPager for that? And if yes, could you give me a link to some example.
I'm just a bit lost, I don't know what to google (and that's about the only problem google can't help you with:)
take a look at TextSwitcher or even a ViewSwitcher if you just want to change the text and you can check gestures out for the swipe action, if you decided to use ViewPager you can check the example provided above, or search google for more examples I am sure you will find lots.
I'm looking for a way to develop a menu which could be visible by sliding on the left of the current screen. One example is the mobile version of Firefox, when you slide on the left, you can access to the current tabs navigation, but the main page is still visible. It is called a sidebar I think :
EXAMPLE
One possible way to do that is to use ViewFlipper, I guess, but maybe is there an easier and more efficient possibility ? And I'm afraid that handling scrolling horizontally and vertically could be a bit difficult...
Thanks for any answers,
Maxetx.
Maybe this will give you an idea
https://github.com/korovyansk/android-fb-like-slideout-navigation
https://github.com/walkingice/gui-sliding-sidebar
You may try out SlidingMenu. There is example in lib.
I'm apparently not phrasing it correctly to get any accurate results on Google. I want to be able to slide right/left to go to another layout. What is the proper term I should be using when trying to find an example of how this is done?
You are looking for the ViewPager.