Screenshots
Background
Graphical tabs started to appear in stock Android application around ICS. However, they are quite different from the traditional tabs (link). Moreover, I have found no related tutorials.
Differences with Traditional Tabs
Graphics instead of text, obviously.
No selection indicator at bottom.
The color of the contents (graphics) indicates the selection instead.
Suspicions
Are they just tabs with an icon but no text, combining together with a suitable theme?
If yes, how to theme the tabs to achieve such effects?
The main difference is that old style tabs were implemented using TabHost and TabWidgets. However, since the introduction of the Action Bar the tabs are implemented as action bar tabs.
You can read about styling the tabs in here.
Basically you can create your own indicator, as well as choose between icons, text etc.
Related
I am trying to customize a action bar so that it looks like which is an IOS liked navigation bar. Here are some articles that i found. link1
It seems impossible to change tabs position and size in android. i had read another stack overflow page which suggest to put a few buttons.
Is there anyway I can make such action bar with one button on the left, on button on the right and a tabs in the middle.
Here's an awesome Tutorial about Android Material Tabs. The tutorial explains about all basic modification that can be done on Tabs. It also teaches to use CustomAdapter to build our own Tab style as you wanted.
First sry for my amateur question
When we want to make an Actionbar, we can use AppCompat or libs(like ActionBarSherlock & ...), and when we want just add any widget(like Button-ImageView & ...), we have to add a lot of codes...
But we can create vertical layout (height:50dip) in all of Activities and use it as the Actionbar...(It's very simpler than use standard ActionBar)
I mean is: why we shouldn't do this...?
thanks... :)
ActionBar comes with a useful API, which allows you to add an app/menu icon to the left, and title, tabs, and action icons, as well as skinning options via themes, in a way that looks consistent across all your Activities and Fragments.
ActionBar also behaves (mostly) gracefully across different devices formats, keeping icon, title and action items in a uniform layout, while hiding excess action icons into a menu on the right. If you develop your custom implementation, you need to test that it doesn't break across Android versions and devices.
how to make the bar in the top of the picture (see the link) (drawerbutton,"mes cercles",picture_pen)? by customizing the action bar or i make it manually?
https://drive.google.com/folderview?id=0B6Cz2zvfARSdOHJKSEppSzd6ZHM&usp=sharing
The ActionBar in that screenshot is custom-made. It is not built using Android's ActionBar controls. It appears that it was created using a RelativeLayout with a custom background, 1 button on each side and text in the middle of the layout. You can do this as well, however, it is considered best-practice to use Android's ActionBar, which can be themed partially. (Background, text color, buttons, logo, etc...)
Since Android's ActionBar is relatively new, you should use ActionBarSherlock, which adds compatibility to Android 2.x.
http://actionbarsherlock.com/
You can customize the actionbar in android to a very good extent , give it a solid / gradient background , customize the font face , add buttons , event give to different round corner values, also tabs are available , i suggest that method so you don't need plug-ins
the below two posts might be useful
android developers page / actionbar
Using the Android action bar (ActionBar) - Tutorial - Vogella
I'm looking through the ActionBarSherlock samples demo, and I see that the List Navigation and the Tab Navigation both make use of the ActionBar's setNavigationMode method. This tells me that you can only have one or the other. If I want the user to have list navigation to move around between activities but I want some activities to have tabs, is there a different way to add tabs than via navigation mode? Is it against ActionBar design guidelines to use both? I don't look at tabs and consider this to be a navigation feature, so I find it odd that you get one or the other.
This tells me that you can only have one or the other
Correct. Bear in mind that with action bar tabs, Android will convert you to list navigation, on its own, in certain configurations, whether you like it or not.
If I want the user to have list navigation to move around between activities but I want some activities to have tabs, is there a different way to add tabs than via navigation mode?
You can use a ViewPager with PagerTabStrip or the tab flavor of ViewPagerIndicator.
Or, you can go retro and use TabHost and TabWidget.
Is it against ActionBar design guidelines to use both?
The design guidelines refer to them as separate options for "View Controls". More importantly, given the automatic conversion of tab navigation to list navigation, it would be seriously confusing for the action bar to have two Spinners' worth of navigation choices.
I have one tough question. I am now playing with design of the Android application and I have the problem with way how the tabs are displaying from some width of display. I use ActionBarSherlock library and ViewPager for tabs.
The problem is that I use yellow color for ActionBar, black for tabs and again yellow for tab indicators, but when I look at the application on wider screen or in landscape mode (I guess approximately from width 400dp) I can't see the indicators, because tabs are hiden in action bar and indicator has exactly the same color. Is there som way how to change color of tab indicators from some display width?
I have tried to do it by making of layout-sw400dp/layout.xml, new 9patche's and new styles, but I can't make it work this way and I think now that it is impossible to do it this way. Do you have any idea how to do this?
Thank you very much in advance.
UPDATE
I have solved it in the following way. I have created folders drawable-w400dp and drawable-land (for ancient phones). Only phones where it will probably be displayed in the wrog way are black berry like androids.
Have you tried using the Action bar style generator. I used this and my tabs have highlights in both orientations http://jgilfelt.github.com/android-actionbarstylegenerator/ it generates 9patches and XML for you