Want to implement tabs in android? - java

I am trying to implement swipe tabs in my application but don't know what is the best way to do it.I am confused as to whether I should action bar navigation bars or some other mechanism.
I want my application to have Scroll-able views like in the link below?
https://play.google.com/store/apps/details?id=com.asus.todolist

You can use uiautomatorviewer to determine what that app is using. My guess is that it is using a ViewPager with a PagerTabStrip for the tabs.

Related

How to handle the back stack of bottom navigation with navigation component

I want to perform a navigation just like instagram and youtube and i tried many ways how should it be implemented? by the way it should work with the Jetpack's Navigation Component what is the newest and easiest and most reliable approach? Thanks for your time.

I have several activities that I want to string together using tabs

In order to do this, I think they need to be fragments or something because that is what viewpager requires. I am not really sure how to do this because I have built my app up using activities, not fragments. Is there a simple way to tab between activities so that the tab bar is persistent?

Drag views in android

I want to create a Draggable activity/fragment like the default settings screen in abdroid which opens when I pull down from HOme screen. By draggable i mean I want to pull the screen down from a point to close it.
I am trying to figure out the term used for this. I went through Drag views but that is used for moving view around the screen. Has someone solved this? Please help!
Android does not provide any API to support development of the settings-like screen. If you have to implement it, you will have to do that by yourself.
In order to fake the settings-like pull down screen within your application, you will need to create similar UI layout and use it in combination with the swipe down gesture (which works only when you swipe from the top within your application) and Animation.
Good place to start is to look on
DrawerLayout
It for drag layout into the screen and out.
A pretty good library that handle the stuff for you is:
AndroidSlidingUpPanel

How do you put tabs under another layout similar to the Google+ app? (Example Pic Incuded)

I want to implement something simlar to this Google+ layout. The page scrolls until the tabs at the bottom hit the top. Then the list view in the tabs scroll. Does anyone have an idea to do that? (The tabs should still be visible but the content inside scrolls.)
Please don't hesitate to ask for clarification.
Any help is appreciated. Thanks.
If you were to use uiautomatorviewer to examine that app, I suspect that you will find that the tabs are a tabbed indicator for a ViewPager. PagerTabStrip is one that ships with the Android Support package, the ViewPagerIndicator library has another, and there are still more floating around out there. Such a tab strip can be placed pretty much anywhere.

How to make tabs like Nexus one weather/news App?

is anyone have an idea how to make tabs like the nexus one tabs from the weather/news app, and i mean the functionality which by flick the screen you could go to the next tab, Thanks
Video: http://www.youtube.com/watch?v=hIu6kCnZVF0
alt text http://www.gadget.pdamu.com/wp-content/uploads/2010/01/Google-Phone-Nexus-One-weather-apps.jpg
You can now do this out-of-the-box in the Android Compatibility library with a ViewPager: http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html?m=1
ViewPager slides between Fragments much the same way ListViews scroll up and down with views.
If you're not interested in scrolling the tabs, there's an example in the SDK that uses a TabHost (instead of making the tabs themselves scrollable left-to-right), but you need not use a TabHost. You could, if you wanted horizontally-scrolling tabs, use a HorizontalScrollView with some buttons in it.
For an approach that doesn't use the compatibility lib, or fragments, see here: https://github.com/olibye/AndroViews
its called a Workspaces UI pattern more information about it and how to implement it here http://www.androiduipatterns.com/2011/06/android-ui-pattern-workspaces.html

Categories

Resources