I put out a request on the twitter a few days ago looking for some new podcasts to give a listen to and a good friend of mine delivered!
A few of these actually caught my eye. Namely:
- Refactor.tv (although I’m only going to give the audio a listen)
- upfront podcast. The JS technology of today is simply moving too fast for me to actually keep up. As it’s just a side enjoyment of mine I’m hoping these guys can point me towards a technology I should be focusing my small amount of free time on
- This developers life. I’m always interested to see the personal side of developers.
- HNPod. Need to keep up on the news!
- The basement coders. Who doesn’t like listening to passionate developers?
The other Podcasts I currently enjoy (because I know you were dying to know):
- We’re alive – A “Zombie” story
- You look nice today
- iOhYes
- Debug
- This american life
- WNYC’s Radiolab
- Herding Code
I really should start writing up my thoughts to what these hosts have to say… hrmm..
Pictures from a developers life | martinvalasek.com.
this is just wonderful.
So I figured I’d take a few minutes to give you a super quick rundown of how to implement Pull To Refresh for the BB10 Cascades applications.
I’ve shared a GitHub project with you to fork and checkout along with this. You should be able to simply import the existing project into the QDE, build and run directly to your device.
So the main two files you’re going to want to take a look at are src/assets/PullToRefreshListView.qml and src/assets/RefreshHeader.qml
RefreshHeader.qml
This is the file that controls how the refresh header will look and act. If you want to change when certain things happen, such as when the text changes from “Pull to Refresh” to “Release to Refresh”, you will want to look inside the onLayoutFrameChanged signal. That’s where all that magic happens.
Originally I wanted to keep as much logic in this file as possible in order to allow you to simply set this as the leadingVisual to your existing ListView, however we can’t listen for the ListView’s release signal, so I had to tie the two in.
PullToRefreshListView.qml
The easiest way to get the pull to refresh implemented in your system is to replace your existing ListView with the PullToRefreshListView. Because I extended the ListView it has all the existing signals and slots you would expect. As a matter of fact there shouldn’t be anything inside of your code aside from this that you’d need to change.
The signal that you’re going to want to listen for is refreshTriggered. This will tell you that the user has both pulled down the appropriate amount, and released.
And to handle the event
I also added another property to the PullToRefreshListView called loading. You’re going to have to set this to false when your data loading is complete. You can do this in C++ by:
http://gist.github.com/4982554
This will remove the loading icon and replace it with the proper text.
It’s really that simple
That’s all you need to do in order to implement this lovely clean expected feature in your apps! If you have any questions hit me up on GitHub! I’m looking forward to seeing your forks and pull requests.
If I only did LAMP development, this would be HEAVENLY
My secret is out… this is how I code.
Pull to Refresh is a pretty expected gesture in mobile apps these days, and implementing it in BB10 is thankfully much easier than I had originally anticipated.
I’ve created a github project for you kids to fork and play with. Over the next few days I’ll work on adding some comments to the code, and writing up a full tutorial.
I think these guys took Pro Skater a little too seriously… that said, I’m stoked. Let’s ride.
This article rang so true with me, and I hate to quote a quote, however it’s just too perfect.
On the other hand you have something PG calls the maker’s schedule – a schedule for those of us who produce stuff. Working on large abstract systems involves fitting the whole thing into your mind – somebody once likened this to constructing a house out of expensive crystal glassand as soon as someone distracts you, it all comes barreling down and shatters into a thousand pieces.
This is why programmers are so annoyed when you distract them.
If anyone on my team reads my blog, please take this quote to heart. Also, just read the entire article. It’s totally worth it.
Five Ways To Write Better Code | BrandonSavage.net.
This article is a great reminder to all of us that we’re never done. I personally am trying to focus on point number 3. To that end I’ve been trying to be more social on GitHub. Feel free to follow me/light a fire under my ass.
