Open source Android ‘Pull to Refresh’ library

I just open sourced my ‘Pull to Refresh’ library for Android. The project page, documentation and of course the code can be found on github. You’ll also find a sample project in the repository. The library is licensed with the Apache License version 2.0. There is a demo video of the sample project so you can see the animations.

Click here to go to the project page.

I added a reference to this library on my projects page.

Posted in Open source, Project | Tagged , , , , | 16 Comments

Android – Row background in GridView

Problem
You basically want a Android GridView, but you want to have a background for each row. Or, you want a ListView with multiple columns. Or, you want a TableLayout with a dynamic number of columns. In fact, anything that has a dynamic number of columns (like a GridView) with a custom bakground for each row (like a ListView).

I had this problem, and this is how I solved it. Note that, as with many problems, this is only one of many possible solutions. Continue reading

Posted in Android | Tagged , , | 3 Comments

A tale about an XSS vulnerability [part 2]

This is the second part of the true story ‘A tale about an XSS vulnerability’. If you haven’t already, read part one here.

TL;DR: Hacker baddymcbad just hijacked superfansadmin‘s session on superfans.foo, by exploiting the vulnerable internal messaging system. At this point, baddymcbad is logged in as superfansadmin, but only for this session. He doesn’t know the username or password of the admin.

BOOM! Admin! I see an extra tab in the tabbar, named ‘Administration’. Needless to say, that’s where I go, as quickly as possible. If superfansadmin hits the logout button, he will log me out as well. Luckily, this attack was pretty stealthy. I don’t think the poor guy even knows I’m here.. Let’s see what the ‘Administration’ tab contains. I quickly save a local copy of the page for future reference. Continue reading

Posted in Hacking, XSS | 1 Comment

Android – Update single item in ListView

A common problem, at least for me, in Android development is how to update a single item in a ListView. I needed this when I wanted to add a fade-in animation of images in a newsreader, where placeholder images were replaced by the actual article images with a fade-in animation.

Continue reading

Posted in Android | Tagged , , | 2 Comments

The story of the delicious pie

People like us, hackers, tend to experiment with their knowledge in the wild. Sometimes just in the spirit of learning, but also out of curiosity and having fun. If you are one of those people who have a bad taste in their mouth after saying the word ‘hacker’, please reconsider clicking on the link you just skipped. (Or here, if you’re lazy). The way I see it, hackers usually don’t cause harm, although they might break the law from time to time. This is a true story of how a company dealt with two whitehats, or greyhats if you like.

Continue reading

Posted in Hacking, XSS | 3 Comments