Pixate / pixate-freestyle-android

Pixate Freestyle for Android
Apache License 2.0
254 stars 55 forks source link

Multiple css files. #23

Closed geftimov closed 9 years ago

geftimov commented 10 years ago

Hello, I want to make several css files and switch them in runtime. The fields in them wii be the same with minor changes :

default.css

#login_button {
   background-color: yellow;
}

default2.css

#login_button {
   background-color: red;
}

That way i can make themes for my application. The only way i found is to override the implementation of the PixateFreestyle class. So my question is: Is there more convenient way to switch between almost same css files in runtime?

Thanks, Georgi Eftimov

Shalom commented 9 years ago

I believe that the latest PR that got merged will solve it for you. See https://github.com/Pixate/pixate-freestyle-android/pull/27 You can call init() multiple times with a different CSS file, and Pixate should reload using the new CSS.