How to achieve Google Play Newsstand Page Tab UI? - android

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.

Related

How to create bottom sheet effect which cover full activity when user scrolls up

As shown in Image, When user click on list a bottom sheet comes up
and when user scroll up that bottom sheet cover full page just like an activity with toolbar.
How to achieve this ??
What is logic behind the scene ??
First question:
How to achieve this ??
Using a custom Behavior (it extends from CoordinatorLayout.Behavior) for a Persistent BottomSheet or modal one.
Second question:
What is logic behind the scene ??
The logic is:
It has some states (like google maps app) hidden, collapsed, dragging, anchor_point, expanded.
When its reaching expanded state it use another modified Behavior to show you an android.support.v7.widget.Toolbar.
By default BottomSheetBehavior has only 3 states, you have to add a 4 state (anchor_point) that is the one that will makes it to stop in half way of Y axis.
Probably now you want to see some code. Look at this simple example project in where you can see how to get 4 states.
pd: this link is the most useless that I have found in all answers about this topic :(
The google team recently released the Android Support Library 23.2, that adds this feature.
This is the link's post ,I hope that it's help you.
http://android-developers.blogspot.com/2016/02/android-support-library-232.html

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.

Android implement left to right swipe animation

In android, i want to move from current to previous activity by left to right swipe as in iOS. I want to be able to even hold while swiping such as both activities are visible at the same time.
I want to introduce transition/animation effect just like in Telegram app. So please help how can i do it.
Tutorials or example code will work for me.
Thanks in advance!
You better use the Swipe animation with multiple Fragments inside one Activity: Creating Swipe Views with Tabs
take a look at this tutorial : HOW TO IMPLEMENT HORIZONTAL VIEW SWIPING WITH TABS
If you're already using Google's NavComponent library, you should try a library that I wrote:
https://github.com/massivemadness/Fragula
It's fully integrated with NavComponent, which means the navigation API stays the same, you only need to make some changes in NavGraph and NavHost container.
Here's the result:

Android: ViewPager needed?

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.

Creating a menu like the new YouTube application

Any ideas how we can make a menu like the one that Google has implemented in their YouTube app. I've read this, but that solution differs from the behaviour of the YouTube application. Does anyone know a real way to go about this?
I'm talking about this:
I believe that they use a HorizontalScroll in a RelativeLayout.
Image that the menu is always there to the left. You make that first.
Then you place a HorizontalScrollView on top of that and then put your main content in that.
Set your horizontal scrolling properties to only scroll a certain max. Then you wire up your menu button to slide your horizontalscrollview to the max you set and that should be it.
You can always check the source to the People Application in ICS. They do something very similar.

Categories

Resources