samedi 21 février 2015

HOW TO ADD IF CONDITION (string match) IN FRAGMENTS (ANDROID)

I am new to android. I'm working on my college project which is to make an android app for the university i am studying under.


I have a login page, which on correct entry leads me to a page(dashboardactivity.java) with a one time passord(OTP) and a button 'proceed' to go to the home page. now i have the home page where i have used fragments. I have used sliding menu (like in facebook app).


For now i just have four options(i.e four fragment pages with respective layouts) now, on the click of my fourth menu, it leads me to a page to confirm the OTP which was generated before. only if the otp i type in the edittext equals the otp generated, i will be able to go to the next page. I have managed to get the otp variable from 'dashboardactivity.java' to 'menu4_Fragment.java' using SharedPreferences.


I tried using the 'IF' condition to compare the string typed by user with the otp. i will paste my dashboardactivity and menu4_fragment files here along with their layout files.


KINDLY HELP, URGENT WORK :(


Aucun commentaire:

Enregistrer un commentaire