Android Tabhost, format text of the tabs - android

I have a tabhost with tabs and the text is set, I just do not like how they are set by default. The text is centered horizontally, but they gravitate to the bottom vertically. I would like to center them completely and resize the text.
I did not see API calls to do this, insight appreciated

See the answer given by Kocus to my question Controlling Tab colour-state / size in a TabActivity? It covers creating your own custom layouts for the Tabs.
Possibly more than you need as I was looking to do more than just text position and size but it's fairly straight-forward. Also, I haven't found any other way of doing anything with the tabs without using this sort of approach.

Related

How to create custom tab size?

Like on the following screen. It looks less than standard size. And without vertical lines between icons.
This is most likely not a tab control at all. You can simply use Buttons or even better styled RadioButtons for pseudo tabs and then use ViewFlipper to display sequence of cards based on which button was clicked

android tab to show vertically at the left hand side of screen in landscape view

I know that it is possible to place the tabs at the top or bottom view in portrait mode. However when i moved the orientation to the landscape view, the tabs will be in a row horizontally at the top.
I saw that it is possible when i opened up the Calendar application in my android phone, because the tabs are vertical in horizontal view, at the left hand side too.
Is there any way to change it to appear at the left hand side vertically on the screen?
is it possible to change it through doing different views in layout-port and layout-land, or change manifest.xml or any other possible way through coding
thanks for the help in advance. this problem has been quite hard to solve.
I think for creating a layout with Tabs on the left hand side, you can get related information on this link: Left Side Tab Widget
Hope this helps.
In my experiments, I found out that there's very little customisation available that you can do with Tabs' position.
This, as an answer, I would say, till now we can't position tabs on the left or right.
I may be wrong, but this is what I feel.
However, you're always free to write your own tab implementation and use it.

Change tab height in a TabView?

Is it possible to change the size of the tabs displayed in a TabActivity? I'm currently only putting text in my tabs and I'd really like to minimize the size as much as possible.
Also, is there a way to use icons for my activity that aren't 48x48? I'd like to do something more rectangular as opposed to square. I just want to use my screen real-estate the best I can :)
How is the YouTube app doing this? (See screenshot, and yes I know that the YouTube app isn't open source)
It seems that they're also making it possible to scroll left and right for more tabs. Any ideas on how they're doing this?
Yest you can do all that by creating your own custom view for tab widget, it is quite simple to do. this tutorial will do the trick
http://joshclemm.com/blog/?p=136

creating a custom image based layout on android

Is it possible to create a layout based on (background) images? For example, there is well know app called Appie that uses this picture as a homescreen:
I might be able to recreate the layout with a TableLayout, but this will be difficult to get it perfectly aligned with the buttons in the image. The default layout options make it very difficult, or maybe impossible, to allow for selection of the buttons on the image (especially when the buttons are in an arc-path).
Can anyone tell me how this is done?
I had some issues positioning a badge on the corner of a view. You can check my solved question:
Positioning a badge bubble on the left upper side of a button
About how it can be done. I would do it with a RelativeLayout and TableLayout as you mentioned, but to be completely sure, you can use apktool to see how the xml are done but it might be ilegal to do it.

TabWidget buttons

Is it possible to display tab buttons at bottom, rather than top? I need to port an application, which was originally designed on iPhone, where the default "tab" buttons are at the bottom.
You can have a look at this topic which gives one known method to do this. However, I suppose that you can obtain an equivalent result by overriding some classes of the SDK.

Categories

Resources