Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Icons - Safe to use system icons across versions?

 
Maneesh Godbole
Saloon Keeper
Posts: 11329
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the quest to make the app appear more 'native' I am wonder if it is a good idea to use the system icons.
For e.g. @android:drawable/ic_delete gives me the nice cross icon.

I checked the following but am unable to find anything which recommends against this
http://developer.android.com/reference/android/R.drawable.html
http://developer.android.com/guide/topics/graphics/2d-graphics.html
https://www.google.com/design/spec/style/icons.html#icons-system-icons

I checked out some other discussions on the net and only thing worthwhile which I could take away was "It is OK to use if it is in the public API (as opposed to experimental API)" From what I understand, it would mean anything defined under android.R.drawable is fair game.

With all this background, I find I have these two choices
1) Go ahead, use them.
2) Copy paste to my drawable and then use

Any recommendations or anything I overlooked?
ic_delete.png
[Thumbnail for ic_delete.png]
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Purely from observations, I think the android.R integer constant values are somehow retained without modification between versions (unlike the R constants generated for application's resources). That's why we can compile .apk against one target SDK but deploy it in a lower SDK device and it'll still work.

The other problem is that the icon's design might change between versions and themes. I have a stock android 2.x device, and its standard icons look *very* different from stock android 4.1, which is again a bit different from stock android 4.4.
Since these changes in looks are unpredictable and somewhat hidden from the app maintainer unless they actually go looking for it, I feel it's better to copy these drawables into your own app's resources. That way, the look of your app will be consistent across versions, even if it becomes somewhat inconsistent with the rest of the environment.
 
Maneesh Godbole
Saloon Keeper
Posts: 11329
16
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karthik Shiraly wrote:
The other problem is that the icon's design might change between versions and themes. I have a stock android 2.x device, and its standard icons look *very* different from stock android 4.1, which is again a bit different from stock android 4.4.

This was precisely my point when I wrote
In the quest to make the app appear more 'native'

Froyo remove icon might be different than say Lillipop. When it is rendered in the app on different platforms, it will look like the 'platform icon' which the user is visually used to.
Agree?
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, agreed it'll look consistent with the rest of the platform. I didn't pay attention to the line about native appearance earlier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic