Pkmmte / PkRSS

A powerful RSS feed manager for Android
Apache License 2.0
100 stars 23 forks source link

i need example #9

Open mahmooddagga opened 9 years ago

mahmooddagga commented 9 years ago

i need example

Pkmmte commented 9 years ago

I have a full app example over at https://github.com/Pkmmte/TechDissected. The app itself is a bit outdated but it has everything from PkRSS you need to know about.

I may write a much simpler example once I get the time...

Suleiman19 commented 9 years ago

Thanks for this library @Pkmmte. Looks very promising. However, I would just like to know, while using async() with a callback(), how do I update my UI? Since doing so in the Callback's onLoaded() always gives an error. Some help here would be appreciated. Thanks

Pkmmte commented 9 years ago

The default thread callbacks are called on is currently a background thread. It's something I'll change in the future.

You can, however, specify a thread for the callback to be called on. If you'd like to ensure the callback is called on the main UI thread, pass a handler object in your call. You can also set it as the default by creating a custom singleton instance.

PkRSS.with(this).load(url).callback(your callback).handler(new Handler()).async().

Something like this should work fine for most cases.