Search code examples
androiddrawablenine-patch

Android: Distorted background for toolbar icons, list items and overflow menu


While developing an android app, i updated android studio and also android sdk. after that, i faced strange behavior. when clicking on any item like actionbar icons, overflow menu and spinners get distorted background like picture below.

َActionbar Icon after click

Overflow menu item after click

my sdk versions are:

Android support repository 32

Android support library 23.2.1

Android SDK tools 25.1.6

Android SDK Build-tools 23.0.2

Android 6.0 (API 23)

SDK platform Rev 3

its same on emulator and usb device, and cleaning and rebuilding the project didn't solved the problem.

Also, i have not put any code in style.xml to customize these items and i use the android default styles.


Solution

  • finally i found the answer after a week of challenging and asking here:

    i was using android gradle plugin 2.2.0-alpha and the problem was rised from that. i didn't know that it can be the source of such problem.

    after returning to gradle plugin 2.1.0 the problem solved!