Issue
Suddenly, when adding another Actionbar Icon via File -> New -> Image Asset
, my existing icons are getting messed up. After adding a new icon, other icons that are already in use in my app are changing.
I added action bar icons earlier, in the same way without any problems. But suddenly it doesn't work anymore. As if the enumeration of the drawables changed ...
I am accessing the icons like this:
ContextCompat.getDrawable(mContext, R.drawable.ic_location)
After deleting the icon I just added (Right click -> Refactor -> Safe Delete
), the existing icons are showing correctly again and everything is back to normal.
Any ideas why this is happening?
Solution
Clean building a project should be your first port of call when your having problems. Changes to the resource's folder sometimes don't get picked up (but usually do, picked up by datestamp). Builds on Android Studio are "Incubating",your guess is as good as mine as to when they are "baked".
Answered By - Jon Goodwin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.