please how can I customize tabwidget to get a flat styled one with no dividers just like this one
You can set a custom appearance for your TabHost by calling TabSpec's setIndicator method with a custom view when you're setting up your tabs. The Google IO 2010 Scheduling app has some examples of this.
But for pete's sake, don't put your tabs at the bottom of the screen like these guys did. Don't treat your Android users like they're iPhone users, you're just insulting them.
Related
I'm developing an app that is using "tabs". I have successfully implemented a design that uses these tabs in conjunction with a number of fragments.
however, I believe that these tabs look pretty ugly. I want to customize how they appear! I prefer them to appear as plain text next to eachother with a "|" between them and underline the tab that the user is one. Rather than the way they are currently designed which is each text per tab is separated evenly with a blue bar underneath it representing that it is selected.
I am not sure where to start. how can I go about doing this?
Check out the PagerSlidingTabStrip
http://www.androidviews.net/2013/04/pager-sliding-tabstrip/
https://github.com/astuetz/PagerSlidingTabStrip
You can hook it up to your viewpager and customize your tabs in many different ways.
Hope it helps!
Firstly, I would like to mention that since i am not sure of the terminology of the view that i am looking for so I shall try and explain the behaviour.
I am looking for build a screen with multiple tabs where the tab indicators do not fit all inside the screen so it is scrollable. This is fine but i want that when the scrolling happens, after the last tab indicator, the tab widget automatically shows the first tab indicator right after it. So kind of like a circular tab widget.
Could someone please give pointers on how this could be achieved in android.
Thanks,
Sunny
I'm not sure, since you're not so clear...but i think you're looking for this:
https://github.com/astuetz/PagerSlidingTabStrip
Sliding tabs like the ones in Google Play.
ALL,
I am trying to port the application from iOS to Android.
In iOS there is a view at the bottom of the screen which holds couple of buttons and it looks like a status bar. One button is implemented as notification button (something like icon in SMS-like applications where you see number in the upper right corner of the icon) and the others are just regular buttons.
This view is always on screen and it looks like a notification area.
Now on Android, how do I implement such a view? Go to each layout.xml and add it there? Can ViewGroup be used for such a view?
Need some guidance here.
Thank you.
[EDIT]
As some people asked here is what I'd like to have.
If you look at the Android phone after boot up (I have an HTC one) there is a grey area at the bottom of the screen. In the middle there is a big button, which says "Phone" and there are 2 smaller buttons - one which directs you to the applications installed and the other is for Personalization of the device.
What we want is something like this with much smaller button images.
[/EDIT]
Tabs on Android are placed at the top of the screen; not at the bottom:
Please carefully read this page: http://developer.android.com/design/patterns/pure-android.html and http://developer.android.com/design/patterns/actionbar.html
You could of course use a custom View, but developing will be a nightmare.
The contents of tabs can be achieved using ViewPager and Fragments: http://developer.android.com/reference/android/support/v4/view/ViewPager.html
While the indicators can be achieved with PagerTabStrips
http://developer.android.com/reference/android/support/v4/view/PagerTabStrip.html
I'm not sure what exactly the view is you are talking about without an image but you can create this layout in its own xml file then you simply use an <include> tag in each xml file. Once you get the properties how you want them it is simply copy/paste into each file, for the most part
I do this in my layouts. I extend from a BaseActivity or BaseListActivityandincludea customActionBar` so I can have the look and functionality I need throughout the whole app.
Reu-using Layouts
I have seen a couple of application having a TabBar like the following here. I am talking about the widget the bottom left hand corner of the image. You can drag the circular disc and change the tab. Also an Image POP ups about the current TAB. I have tried searching about but so far no luck.
Kind Regards
This is something that HTC developed for their own usage.
it is not available openly to developers sorry.
If you want something like this you will need to develop it on your own.
You can achieve this by using a TabHost widget with TabWidget placed in a horizontal scroll view and then on tab click show some kind of custom fullscreen Toast message with the description and the image. also customize the TabWidget, you can definitely find info on the Tabhost and customizing the tabwidget either here on stackoverflow or some tutorials on google.
In any case you definitely need to do this from scratch, but its certainly possible.
I am trying to create a rather radical tab redesign for my Android app. I want the tabs to be differently sized both in width and height, as well as having the focused tab have a shadow over the content as well as other tabs. However, I do not know how to change the height of tabs or the shadow cast by the focused tab. Can anyone help? Here's what I'm trying to achieve:
If you want to customize your Tabhost with your custom style means, you've to customize it. For this case we can do with one feature -
1) Inflating the customized xml file to main TabWidget's using LayoutInflater
2) Do the changes whatever you need in your inflated xml file. For, this please refer below existing answer from stackoverflow. This will surely help you.
Customized TabHost