During DroidConNL 2013, I visited a talk about using CSS to style native views on Android. The guy showed his library and an example, which was really awesome. Since I finally found some time to look into it, I tried to set up the demo from nativecss.com, like . The included assets/styles.css is also placed on a server. The server is definitely working and the file is accessible.
If I run the demo, on a Samsung Galaxy S2 or a Samsung Note 3, the applied style appears and than disappears again. And that repeats all the time when you leave the app in the foreground. I noted that the styles are switched everytime after the interval that was set with NativeCSS.styleWithCSS( "styles.css", css, EverySecond );
. The css parameter is the URL to the external css file.
I have no clue why this happens and I am unable to see where this 'flashing' behaviour comes from. Anyone any clue what happens, and more important, how to fix it?
Screenshot taken from Samsung Note 3.
I had this problem too, and reported it. It turned out to be a bug in the synch process. And it has been fixed a few days ago, and I'm guessing the next update will contain the fix. I'm not affiliated with the nativeCSS team though in any way, so I have no idea when said update will be out =)