ActionBar tabs have space before them - android

I have an app that has transparent actionBar and is using AppCompat support library. My problem is that I want to align my ActionBarTabs to the very left but there is some space left and I want to get rid of it. Also, how to properly align the icons with the rest ? Is that in the size of icons ?
Here is the screenshot of my app:

If you use a 24x24 icon you will be fine. Try go to here download any icons you want and use the icons with 24dp.png in filename and see how it looks.

Related

Why custom icons add on the toolbar becomes distort?

I want to use my own made custom icons such as a brand logo and a brand text to my action bar used as toolbar but the problem is that my logo image and brand text image becomes distort when i add these on action bar even i have created separate files such as "mdpi" etc.I tried to create icons with image asset studio but icons becomes so smaller and resizing them effect their visual quality
Here is the image of action bar
Now i am in the trouble suggest me better solution to add icons in a perfect way to my action bar which is used as toolbar.
Visit https://romannurik.github.io/AndroidAssetStudio/icons-generic.html#source.type=clipart&source.clipart=ac_unit&source.space.trim=1&source.space.pad=0&size=32&padding=8&color=rgba(0%2C%200%2C%200%2C%200.54)&name=ic_ac_unit
Create a Generic icon of 32dp or 48dp with Asset Padding 0dp.
Check the image of my action bar.

How to make Circular Logo in Action Bar?

My requirement is to make Circular Icon to ActionBar. I used custom view to display circular image(you can see in the screenshot.) I want to use Home icon(In this case, green android icon) as a circular image. How can I make Home icon as a Circular Image??
Note: In my case I'm downloading images from Server and setting it to ActionBar using setLogo() or setIcon() method.
Make the image default logo of your application.
Change it in the manifest file or the drawable folder.
Action bar logo is mostly your application logo by default. So either Change your application logo to circular or whatever. If you want to change the app icon (logo). Use setLogo(int) or setLogo(Drawable) method of ActionBar. Don't forget to call setDisplayUseLogoEnabled(true)

Styling Android ActionBar

The image will explain everything i need ;)
I'm looking for the exactly same style ( with the thin line also that is near to their logo) (keep in mind i have the logo drawable file )
UPDATE
Now i'm getting exactly what i want but i have one bug yet.
How to remove the arrow highilited in red? keep in mind i'm extending Sliding Menu
Have you tried getActionBar().setLogo( R.drawable.logo );
you can use getActionbar().setDisplayUseLogoEnabled(false); to remove the icon from the actionbar and then getActionBar().setDisplayShowHomeEnabled(true) to enable the arrow but the image you show looks like they created an image with an arrow and replaces the icon with that arrow image.
so in other words you would use this
getActionBar().setIcon();

ActionbarSherlock want to insert an image inbetween icon and Tabs

I have a tablet layout using ABS.
The Home (app) icon is displayed and my 4 tabs are shown to the right of it.
I'd like to insert an image (for advertising) inbetween the icon and tabs.
Does anybody know if it can be done?
Thanks in advance.
You can't insert an image between the icon and the tabs, but you could:
A. Use a logo drawable which has the icon and ad in it -- then add this by setting the android:logo attribute on your application or activity to your logo drawable.
or
B. Use a custom view and set this on the ActionBar with setCustomView(View view).

Android change of ActionBar tab from some width

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

Categories

Resources