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.
Related
I'm planning to implement tutorial screen for Android app.
My plan is that tutorial screen looks like:
There are several screens and you can swipe between than. Every view has custom design. There are dots which represents every screen, and show what page are you watching now. I need good-looking transition with adequate animations.
This screen will be full screen activity.
I have found several Image Galery, but I don't want to slide between images, I need to slide between views.
I do not need exactly code for this. I need instruction in which way this can be done, and what elements I need to use in order to achieve targeted design.
Thanks in advance.
You'll want to use ViewPager in conjunction with Fragments, the instructions are on Android developer's website.
I have 2 screens black with scroll View in it and then I would like to change these screen with a swipe. I am using Android Studio and want to have a simple example so that i could change all the screens from one to other using swipe view. I hope the best example from the all the best developers on opposite side.
Thanks.
View Pager will be the best suited component. There are a lot of samples available in the net.
I have existed code for two activities(ActivityA and ActivityB).
Now I need to have a another activity, which will act as my first and only screen of my application. This activity will be having two tabs on its header part and I need to display each of my Activity when user press on each tab.
I have done some search on this and found TabAcivity will be suitable choice, but it is deprecated now.
I saw many posts which are suggesting Fragments. But I dont want to change my existing code. Can any one suggest me easy method to incorporate this.
you can use Android Tab Layout with Swipeable Views
here i give Link in this link step by step information given. so i think you can get batter idea from that.
Tab Layout with Swipeable Views
you can also download code from this site and also see video in given sit
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.
In my application I want to use 4 tabs and each tab will have more than one screen. So I tried to get this and found there are two ways to do this:
Use ViewFlipper inside every tab.
Use ActivityGroup in tabs.
However, I'm not sure which will be efficient and easy way to do this since I'm a newbie in Android. So please help me.
Please post me some link where I can get sample code related to ActivityGroup.
Activities are self-contained parts of your app, views are used together when they display similar type of data/behavior.
For example if your tab 1 is taking a picture and your tab 2 is showing a map and your tab 3 is sending an email then you're better of using activities as the action are completely different, with different layouts and different behaviors.
If tab 1 is a listview with an rss feed from techcrunch, tab 2 is a rss feed from StackOverFlow and tab 3 is a rss feed from bbc news then use a viewflippers : Same behavior, same actions
THis is simple to implement
Adding Activity Group will be more preffered then adding View Flipper. By this all the code and activity contents are separated and in more manageable form plus its a stable thing to use
I have the same issue but got it totaly RESOLVED Check The Following Link
http://ericharlow.blogspot.com/2010/09/experience-multiple-android-activities.html
Changing the view within the Android Tab Widget
Its The Solution For Me . Hope It will Help You as Well