how do I rewrite this program to android program? and what am I doing wrong ?

Printable View