Search code examples
androidandroid-studionine-patch

Android Studio doesn't recognize 9patch generated images


I generated 9patch images from Simple 9 patch generator available free on the internet for the splash screen. When I write android:background="@drawable/splash.9", it doesn't recognize the image.

Plus , when I select Android from the drop down menu on left top side , I don't see the images I put in different drawable folders. enter image description here enter image description here


Solution

  • No need to add the .9 suffix. It's just there to tell the build environment that this is a 9patch. Link to documentation.

    android:background="@drawable/splash"
    

    should be enough