How to stretch icon to fill the button in Android tab bar? - android

I add the image as icon on tab when i use tab bar. But it is so small. I want it to stretch to fill whole the button. Is there a way to do that?
Here is the Snapshot of my app:
Snapshot of my app
(Sorry, I am newbie so don't have enough reputation to post image, you can use this link insteed!)
Any help would be appreciated! Thanks!

I suggest you to have a good reading on the action bar design guidelines.
It shows the correct icon sizes to use:
http://developer.android.com/guide/practices/ui_guidelines/icon_design_action_bar.html

Use the following link and study about action bar
https://developer.android.com/guide/practices/ui_guidelines/icon_design_action_bar.html

Related

How can I modify this design on android? Can I put icon left side of other tab items?

Is there anyone to help me with making this design with tab layout on the android studio? Can I put icon left side of other tab items?
enter image description here
You can check this, probably all possible combinations are well explained.

How does instagram fixed and change the bar when scroll up in android?

Notice: I cannot provide pictures due to my reputation.
When we scroll down from the feed in instagram the action bar is actually hide and a white bar that indicate the user name and time is fixed at the top. When we scrolling down again the previous white bar will scroll up and next bar will fixed at the top again. I want to make something like that for my school project.
So my first question is how can I hide the action bar while scrolling up and show it again while i scrolling down?
Second question is how can I make the white bar just like how instagram did it?
Any help will be highly apperciate!!
I am not a 100% sure what to do to accomplish the movable action-bar, but you may want to look into "toolbar" which may provide more manipulation potential.
http://www.google.com/design/spec/layout/structure.html#structure-toolbars
http://developer.android.com/reference/android/widget/Toolbar.html
http://cyrilmottier.com/2013/05/24/pushing-the-actionbar-to-the-next-level/
Also, if you are looking for the white part that has to do with usernames and such inside instagram, you should look for an effect called sticky-headers.
Awesome library to quickly add list view animations, such as sticky-headers
https://github.com/nhaarman/ListViewAnimations

Android: Positioning Action Items on the left of the Action Bar

Hello everyone,
The first two pictures from the top is currently what I have. The arrow changes images when you click it. I want to make the arrow(action item) closer to the title(sort by) due to design requirements. I have tried to add blank action items to push the arrow over closer to the title but will not work to the various screen sizes.I also realize that the action bar is quite limited as you can only add action items to the right of the action bar.
I gave an example by displaying the bottom two pictures. As you can see the arrow is close to the Chinese title.
Any Ideas will be greatly appreciated as I am quite stuck. Thanks in advance !
Regards,
Ryan
You might be able to tell what the Chinese app is doing via uiautomatorviewer. Possibilities include:
They are using the logo, where the Chinese characters and the arrow are both part of the graphic image. See setDisplayUseLogoEnabled().
They have disabled the title and are using a custom navigation view. See setCustomView().

Setting custom image view as action bar's menu icon

I would like to add one of the menu icons of the action bar as below.
I need an icon and a bubble on top of that and I need to display a number on that at run time.
Is it possible to do? I have Googled regarding this, but couldn't find exact way to do.
Thanks in advance.
what you want is call "badge"
A simple way to "badge" any given Android view at runtime without having to cater for it in layout.
try this Lib
https://github.com/jgilfelt/android-viewbadger
You will have to define custom layout for your action bar as mentioned in the tutorial here
and to display counter above the Imageview android notification class can be used.

Title Bar like that of Youtube app

I want this type of custom title bar
But can anyone tell me what the portion marked with red is made of? I mean are they tabs or image buttons or something else? Please don't give me links on how to apply a custom title bar, I already know it. But I don't know what the red-marked portion is (tabs or image buttons etc) And how can I have that vertical line between Search and Make Video option (in the portion that's marked red) I'm using Gingerbread.
I tried using search engines but how can I search when I don't know the name of the thing I want to search :s
They are called ActionBar Action Items. See: http://developer.android.com/guide/topics/ui/actionbar.html\
As for dividers, take a look at: ActionBar MenuItem Divider
You should to use ActionBarSherlock.
http://actionbarsherlock.com/
This is for add actionbar in devices android <3.x.

Categories

Resources