Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

my 9 Patch Image stopped working

I have been using 9 patch images for a while now. But have come to an issue. The GUI designer in Eclipse tells me that the image works fine. And it looks how it should.

However in the device it just stretches the image as if it were a normal png.

The worst part is that it was working but then i did a Clean and Rebuild and I cannot seem to get the 9patch image working any more.

My question is has anyone else encountered this issue. Is there some setting somewhere in the android compilation or in eclipse that would turn this off. I have opened the images in draw9patch.bad and they seem to be working correctly. The really perplexing issue is that they show fine in eclipse, and they were working in the application in the device. All the sudden they wont stretch correctly.

like image 800
The Lazy Coder Avatar asked Oct 28 '11 20:10

The Lazy Coder


1 Answers

Ok so Im not sure if this fixed anything but I opened them and saved them again and they did not funciton still. But then I opened them and edited them. (added a pixel and saved. Then removed that pixel and saved again.) and returned them to their original data. And that seemed to fix the issue. Maybe having not edited them caused draw9patch.bat not to actually re create them. However editing them and saving them caused them to be re created and therefore they worked again.

Odd issue. and I dont know why it happened since the image was not broken and rendered in eclipse fine. But all is well again.

like image 131
The Lazy Coder Avatar answered Oct 27 '22 03:10

The Lazy Coder