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.
Related
I've inherited support for an app that is used with a particular manufacturer's Tablet/Device with mdpi screen resolution. The code was written using the Theme.DeviceDefault and the actionbar menu item's icons are stored in a drawable-mdpi folder.
In order to take advantage of the TabLayout api, I switched to Theme.AppCompat. The undesirable side effect of doing so is that now the ActionBar menuItem icons are drawn considerably smaller. I've experimented with re-sizing the icons/drawables without success. What digging I have done suggests that the actionbar menu-items have a fixed padding or blank touch area and the icon embedded in the MenuItem will not fill the menu_item parent button.
Is there anyway of forcing the icon to fill the MenuItem while using the AppCompat theme? Any suggestion as to how to restore the action bar icon size to that previously seen with the DeviceDefault theme would be welcomed.
I have downloaded the Android Design Icons from the android website. To be specific its Android Design - Icons 20131120, the one I have downloaded on my pc. What I need is the ic_menu_save (64x64 in dimension) icon which is not present in the folder Core_Icons\unstyled\xhdpi. This icon is whitish/transparent when you see it at first glance. Where do I find this one?
if you are looking for this icon
you can get this in Action bar icons as menu has been replaced with Actionbar and the below is the link for the Actionbar icons
https://developer.android.com/design/downloads/index.html
in this webpage Action bar Icon pack, click on the Action Bar Icon pack blue button to download those images
there will be holo light and holo dark images, you can find grey or white as per your requirement you can that particular image in 05_content_save folder of all the sizes
I think android icon has been updated and you can find save icon in this folder
"Android_Design_Icons_20131106\Android Design - Icons 20131120\Action Bar Icons\holo_light\05_content_save"
Hope this might help you a bit.
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)
i am learning actionbar and created an actionbar with tabs .the following image shows the view
!
requestWindowFeature(Window.FEATURE_ACTION_MODE_OVERLAY);
ActionBar ab=getActionBar();
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ab.setBackgroundDrawable(new ColorDrawable(Color.MAGENTA));
ab.addTab(ab.newTab().setText("Popular").setTabListener(this));
ab.addTab(ab.newTab().setText("Latest").setTabListener(this));
ab.addTab(ab.newTab().setText("Nearby").setTabListener(this));
They following are my queries :
the tabs have shifted to a bar below the magenta color bar. is it due to space constraints of mobile.if a wish to add any item to this magenta bar with the tabs below how can add to it and then show the same pattern whether it is mobile or tablet.
i want to make this tabs bar transparent so that i can see the text move behind it.i have tried to set its drawable as per code above but it has only changed of top bar but not the tabs bar.
what is way to have a button on the magenta bar onclicking i have this screen shift to left and show another screen which has some links show up in a way that partly this current screen is also visible.i hope i am able to explain my point.
kindly clarify
Question 1: It's down to device space constraints. The first paragraph in the Android documentation for tabs in the action bar show that if there isn't room it will split the tabs to a separate bar.
http://developer.android.com/guide/topics/ui/actionbar.html#Tabs
Question 2: You need to set the drawable for the background and the stacked background of the action bar to your transparent drawable. (Edit: Links in Ye Lin Aung's comment show how to do that).
Question 3: It sounds like you are looking for a navigation drawer layout arrangement to me. The best place to start on this would be this link:
http://developer.android.com/training/implementing-navigation/nav-drawer.html
Edit: The pattern will work the same for both mobile and tablets (though you may want to have an xml for smaller screens that have a slightly thinner drawer sizes).
The android documentation in the link above states that the drawer width should be set in dp units and that the drawer height matches the parent view. The drawer width should be no more than 320dp so the user can always see a portion of the main content. This should allow most phones to view it in both portrait and landscape and still see some content.
I am using the ActionBarCompat sample. If our action bar has a dark background, we want to use white-colored icons. But these icons are also used for the system menu items (when they don't fit on the action bar, pre-honeycomb). So the white icons aren't visible on the system menu white background. Example:
What can we do about this? Is there a way to use the dark version of icons when shown on the system menu, and light colored when on the action bar?
Thanks
There are only two ways to handle this issue. Either change the color of your ActionBar, or edit the color of your icons.
I would suggest that best combination for Actionbar and icons would be Red color for Actionbar and white color for your icons.
And how can white icons be visible in white background??? If you remember in Menu icons we have grey background with white icons. That's why they are easily visible in Menu's.