On iOS devices the icon UIBarButtonSystemItemAction (a rounded rectangle with an arrow coming out of the middle and bending to the top right, Google image search shows examples) is used to e.g. open a document in another application. What is the equivalent icon for Android?
The icon resource used for sharing action (which seems close to UIBarButtonSystemItemAction) is android.R.drawable.ic_menu_share. Please read Pure Android to understand the conventions and design decisions you should make while porting an application from other platforms to Android.
Someone has compiled a list of android.R.drawable icon resources. You can check the available drawable resources yourselves following the tutorial here.
Related
I build my Android app with VS2017 Xamarin, but I'm not sure that has anything to do with my problem. I have built an app icon (PNG) that looks like this:
But when I launch my app in an Android emulator, it always crops out some of my icon, thusly:
Notice that a bit of the truck tires and truck top get cropped out. But this makes no sense because as you can see in photoshop, there is plenty of empty space between the truck icon and the edges of the square. I want that space/margin to be preserved inside the icon, and not so aggressively cropped.
I keep adding more and more space, but something (Android OS? Xamarin compiler? VS2017?) seems to be ignoring the margin/space and trying to aggressively crop right up to my icon.
How can I solve this?
It's because your app is trying to look for a Round Icon file as you can see in this Microsoft blog post. The easiest way to solve all your Icon issues for Android, including the pesky adaptive icons, is to use Android Studio. You just install the free application (Windows/Mac) and then
Open the Android Studio, and create a blank project. Then right click on the resources folder of the project and add an “Image Asset”.
In there, add the image, and then resize the image appropriately. Press OK.
Reveal the file in Finder/Explorer and Migrate all the files and folders to your existing project in Visual Studio.
For rounded icons to work, you might have to make changes to the manifest file, or what ever file in the app you set the icon image name, and add an attribute of rounded-icon like in the article
Test it & it should work
I am developing an app in which there are multiple tabs with icon without any title. The problem is that the icons are not looking as bright it should. I used white color(FFFFFF) in creating icon assets. Still it doesn't looks so good.
The pic above shows Facebook Messenger and my App. There is difference between color(although both are white).
Any suggestion will be appreciated.
Yeah I have experienced similar problem. I think it is fault of android asset studio when I create icon with white in reality they are no white as I expected.Then I found very good online studio which is same as Android asset studio even better than that. Solution for this I think you have create icon out from AS then import them to appropriate folders.Here online icon generate web site link
Note: The question is old, but I consider sharing this information could be useful for anyone who could stumble upon this issue in the future.
If you use the Asset Studio tool from the Android Studio your icons will contain
alpha channel with a value of 60% (value depends on selected colour). I provided an example below.
In case you can use vector graphics it should work for you because you can freely edit XML file describing the generated image. Just remove android:alpha=".." attribute.
If you cannot use vector graphics and want to avoid transparency use this official online tool from Google to generate material icons for your application.
This tool supports multiple sizes, black and white colours, and SVG as well as PNG format:
Issues example of 60% alpha channel in Android Studio:
I wish to display notifications as shown in the image link below using Xamarin Forms shared project. Is there a way to add text/number over the icon of the toolbar item?
Follow this link to view example since i cant post images.
This is not possible out of the box in Xamarin Forms at the moment (v1.4). You can however create a custom renderer in your iOS and Android project that does the trick.
This article might help you: Creating a Cross-Platform Application Bar for Xamarin
On TabBarItem (for iOS) there is a possibility to set BadgeValue which probably is what you are looking for. This property does not exist on ToolBarItem.
Another, uglier, solution is to add images with different numbers and in your view model select the appropriate image.
I have an app that features a grid view. For each item in the grid view I want to provide a context menu, much like you see on the play store
I would like to use the built in android menu icon, but I can't find it anywhere in android.R.drawable, like one might expect it to be. Where, therefore, can I find the icon so I can set it as a drawable in my grid view item.
According to Dmags' answer to this question Google advises that
you should not reference these icons using the Android platform resource IDs (i.e. menu icons >under android.R.drawable).
(though the page linked no longer appears to contain this warning)
I am puzzled as to why this advice would be given? I would want the design to be consistent with the OS it is running on. If Android 5 decides to have an image of a lemon to display the menu, I'd want my app to also use the same image of a lemon to show sub menus.
So can anybody either give me a good reason as to why I should be creating my own graphic rather than use the default Android graphic, or give me the location in which the menu graphic can be found?
Have a look at your android-sdk folder:
C:\Program Files\android\sdk\platforms\android-18\data\res\drawable-hdpi\ic_menu_moreoverflow_normal_holo_light.png
I think this might be the one you are looking for.
It is not a good practice to use drawable direct from #android:... because android is an open-source platform and every customer (like Samsung or the cyanogen mod crew) can build their own version of it without the drawable u are using. so you can get a null pointer exception. The better way is to copy the drawable from the android sdk directly into your project.
What I mean to say while you're just getting started with the development and say you add a slider theres a predefined skin for that and you can place it somewhere on the screen, but in some apps there are things like a knob in a place of slider which you can rotate to do the same stuff what the slider does . How do they do that, does it require openGL or something I am not asking for a complete tutorial or something just curious on what stuff goes into building such thing
Mostly, if something is not provided out of the box, you will have to build your own control.
For example, you mention a Knob. That isn't available in the Android SDK. Such a control could prove to be useful.
Here is a tutorial to build such a custom Control: http://go-lambda.blogspot.in/2012/02/rotary-knob-widget-on-android.html
This is an image of the final result from the tutorial linked above:
Here is an example of a custom slider / seek bar: http://permadi.com/blog/2011/11/android-sdk-custom-slider-bar-seekbar/
This should give you a rough idea on how to go about creating your own custom views.
And finally, what I personally find the best possible resource for keeping track of almost all good Custom Views is here: http://www.androidviews.net/
The androidviews.net website has shut down. Android Arsenal is a new website that lists several third party Android libraries.