Fixed potential NPE if the lottery ID is not consistent
Fixed string comparison
Minor change: that URL variable could be inlined

A better question is why that code is duplicated three times, though
Removed extra xmlns tags
Added missing width and height definitions
Added targetSdkVersion to 18
Moved the permission declaration to the top
Merge pull request #4 from androidsx/fix-potential-bugs

Fix potential bugs