I need to implement iphone like tab in android. Which means, if there are more than 5 tabs are there the 5th tab text must show "more"? How can I implement this? Is it possible to do so in Android? Please help me. Thanks in advance
As far as I know, it's not possible. You can however implement a scrollbar for the tab widget, so if you have more than a number of tabs and they don't fit the screen, it won't show a 'More' tab, but you can scroll to the rest. For more info about this, check this link.
I totally agree with #yugidroid but sometimes it's hard to explain this to designer :) So you will need to implement that attitude of tabs by yourself, it is possible though.
You can check out my repository on github to have an idea where to begin. You can do it by modifying that actually...
You can add this to your activity:
tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
After adding this you can have how many tabs you want.
Related
I would like to ask about the tinder-like swipeable card stack for my application. The point of it is that users will be able to see photos and swipe when they want to see another one. I'm already sending and receiving images to and from webservice and I have been trying some libraries that could manage to do this (googled 'swipedeck' and 'swipecard') but non of them either offered enough flexibility to customize actions fully, or were not working with ImageViews, only TextView.
Now I'm new at this, but I figured that there has to be some kind of RecyclerView, TabLayout or some other implementation that would make it possible to do this and would include also transitions/sliding effects between pictures. I just need someone to point me in the right direction.
Could you please help me by posting your ideas? It would help a lot, and I do not need any specific code parts, I will do my research later on based on your ideas. Thank you a lot!
This is the official guide on creating sliding screens using Viewpager. This should help you get started : Using Viewpager for Screen Slides
There is a project in github that does exactly that - it's called "TinderStack", and you can find it at https://github.com/lawloretienne/TinderStack
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.
I want a tab view activity which will display 3-4 screens in it. I don't care if tabs are fixed or can swipe but I want it to support atleast API 8 or min. a rough overview you can get by below image.
Please let me know what should I use and is there any build-in API or something that can help.
Thanks for your help.
Regards,
Sourabh
Navigating using tabs is easily implemented using TabHost. There is one main Activity which lists all the tabhosts, and they define the other screens. This is explained very well in this tutorial. http://www.mkyong.com/android/android-tablayout-example/
The code for each screen is written on a seperate Activity.
Hope this answers your question.
I want to make an application which will look like android home screen. where I want to place some icons. it will have 10 pages. I want to do scroll between these pages.
How to achieve this? Plz help.
Thanks.
I'm not sure how to archive the home-screen like switching but for the icons, you can use a GridView. To switch between the pages, a TabLayout could be used. Also I found this, which might be what you're searching for.
But there might be bettwer ways of doing this...
I want to create a UI similar to the images shown in the links given below.
http://www.4shared.com/photo/EU1KsEPC/device1.html
http://www.4shared.com/photo/tcQMx75T/device2.html
The requirement is, when I swipe to the right, it should go to the 2nd, 3rd pages and so on. And swiping to the left should go to the previous page.
How can I create such a UI? What layout should I use?
Any help in this regard would be well appreciated with points.
Best Regards,
Rony
I think you should look into a GridView.
http://developer.android.com/guide/tutorials/views/hello-gridview.html
http://developer.android.com/resources/tutorials/views/index.html
Perhaps your looking for this answer?
Implementing Swipe action on ViewFlipper with multiple GridViews