Wednesday, May 18, 2016

Making Captcha In Android Using Android Studio Part II

Okieee... Let's continue part II... In the previous part, we have made two classess, MainCatpchaHysoka & TextCaptchaHyosoka, and now we will gonna make one more class namely MathOperationCaptchaHyosoka eheheh... :D
then extends this class from MainCatpchaHyosoka too....
Let's create variabel and it's contructor :
And change protected Bitmap image() as shown below :
Yeeeeiiiks... Coool.... Let's go to MainActivity.....First thing first.... Let's add some needed variabels for connecting our layout element to mainActivity :
Theen... Initializing our first captcha as plus_minus_multiply :
If we run this project, It should be looked like this :
Okieee... Next.. Let's put a handler for "Refresh" and "Cek" Button....Buut... first let's create a new string variabel called "answer" :

Refresh Button :
Cek Button :

Demo :

You download this project from my github repo righthere....

No comments:

Post a Comment