Closed kiaanpillay closed 8 years ago
I have imported the project with Gradle and it is working just not with my images
@kiaanpillay So you've already included the library as a module. Now you need to replace our images (sun.png , sky.png , buildings.png ) with your own - for all screen densities of course. And it should do the job.
@shliama I already tried this today. But gradle always updating library to use default resources. So if you make these drawables customizable programmatically. We will be very appreciate that :)
Hi, I have the same problem. Gradle updates the resources ever time I run it. Not sure what to do?
@kiaanpillay I used this library man. It is real pain to implement that too. But I finally made what I want. After spend whole day...
I tried to get that lib working with no luck. Yalantis is so simple I love it, I just wish I could change the images? Any help?
@kiaanpillay Sure, I'll try to implement it soon but I cannot give you any ETA on this.
But still I cannot understand how "Gradle updates the resources ever time I run it" is possible? :)
So, you have included library like a module
(not like this compile 'com.yalantis:phoenix:1.2.3'
) but just folders with files etc, and added it to your
settings.gradle (e.g. include ':app', ':libraries:phoenix'
)
Then you have replaced images in the library res folders with yours (names the same of course) and it won't work for you?
I did it like this compile compile 'com.yalantis:phoenix:1.2.3'
@kiaanpillay So how do you even replaced images? Please just follow my answer and it'll work.
I'm not sure what you mean? Must I just copy it and add it to the settings.gradle? Please give clear steps, I'm sorry if I'm being ignorant. Im just really struggling, I really appreciate the help
To import the library to Android Studio:
libraries
in your projectlibrary
folder to this libraries
folder (optionally rename it to e.g. PhoenixLibrary, you might want to include some more libraries later)include ':app', ':libraries:PhoenixLibrary'
dependencies {
//...
compile project(':libraries:PhoenixLibrary')
}
Sync your project - boom! Now you have Phoenix library included. But not like .jar - whole source code, so you are able to modify it (and replace images too).
P.S. If you still have problems - check this SO answer http://stackoverflow.com/a/21170626/4903519
Perfect! Thank you so much! I think it would be best if you made it customizable from the gradle build, just as a suggestion. But thank you so much!
Hi,
This may be a very dumb question but I don't understand where we are supposed to change the images to customise it with our own?