How to edit ActionBarSherlock navigation tab size - android

Please take a look at the image above. You can see that the navigation tabs in Actionbar of the Google Play market screenshot is like 2/3rd the size of ActionbarSherlock Samples/Styled application. I have searched and searched but couldn't find an attribute that can change this. So how can I decrease the size of these nav tabs. It looks like a pretty easy way of saving some screen real estate.

That is not action bar tabs. That is an indicator for use with a ViewPager.
There is a rudimentary implementation of this in the support library (PagerTitleStrip) but it leaves A LOT to be desired. You should take a look at http://viewpagerindicator.com for a much more comprehensive implementation.

Related

How can I have a tabbed app in Android like Spotify does?

I'm totally new to Android development. I even don't know the name of components yet, something that make a bit harder to find how can I reach my goals.
Now my main goal is to desing a screen with a bottom tabbed bar, where the user can click in the tabs and the body of the screen changes, like the Spotify's do.
This image shows exactly what I'm looking for with those five icons at the bottom.
You are looking for navigation bottom bar.
Link for design guidelines:
https://material.io/guidelines/components/bottom-navigation.html
Link for example library implementation: https://github.com/aurelhubert/ahbottomnavigation

Flickr-like Android ActionBar

I have been doing a small research on UI designs for Android for the last few weeks. My main concern right now is the action bar along with tabs. I believe the default android implementation takes to much room on the screen.
Recently I took a look at the Flickr app and I really like how they do this but I am not sure how to implement tabs this smoothly inside the action bar itself.
All help / ideas are appreciated.
Thanks in advance.
Screenshot of the action bar can be found here:
https://dl.dropboxusercontent.com/u/242865/Screenshot_2014-11-11-11-04-05.png
Check out this library on github.
It's an Android Library to help you create actionbar tabs like Capitaine train app by Cyril Mottier.
You have to set a customview in your actionbar and use something like ViewPagerIndicator
http://viewpagerindicator.com/
To setup a custom view in your actionbar just use setCustomView but remember to enable the display of custom view first.
Take a look at this
http://www.jfarrell.net/2013/10/customizing-action-bar-in-android.html

ActionBar Sherlock tab too short // How to set width of an tab

I'm working on a project with a tab navigation. Because it should be compatible with Gingerbread I'm using Actionbar Sherlock for this approach. My Problem is that one tab is too short an one letter of the word is shown in a second line:
What can I do to set the width of an tab so that it fits the word?
Thanks for your help!
You can reduce font size in tabs to make it according to your needs, but his solution has its limits.
One of other solution is that, you can use ViewPagerIndicator library, It has tabs, which can scroll if they do not fit in screen. See example code from following link
https://github.com/JakeWharton/Android-ViewPagerIndicator

ActionBarSherlock tabs customization

I'm using ActionBarSherlock in my application. I would like to use icons/images in the actionbar instead of the default tabs. But unfortunately the images/icons I used by using .setIcon(), I find that there is a lot of padding being applied before and after the image/icon on each tab, thus making it look ugly.
Current tabs image
Could any please guide as to what needs to be done for this?
Intended tabs image

how to design tab which onselect comes in center of a tabhost

I just encountered a problem in layout design with tabhost.
i need exactly the same design so that on selecting a tab it will come in cented of the screen. with design like in these pictures.
Currently ViewPagerIndicator is the best resource for getting this done without too much code. As for the same design you're going to have to do a little work yourself to get that done. If you look through the samples on the projects github you'll see some examples of how the ViewPagerIndicator can be themed.
http://viewpagerindicator.com/

Categories

Resources