@@ -97,7 +97,7 @@ public void onClick(View v) {
9797 Log .d (TAG , "onClick Finish" );
9898 //se non è stato selezionato un livello di esperienza
9999 if (!isExperienceSelected ()) {
100- Toast .makeText (registrationSurveyActivity .this , "select your experiance level" , Toast .LENGTH_SHORT ).show ();
100+ Toast .makeText (registrationSurveyActivity .this , R . string . selectExpLevel , Toast .LENGTH_SHORT ).show ();
101101 Log .d (TAG , "if esterno" );
102102 }
103103 //livello di esperienza selezionato, tutto ok
@@ -122,15 +122,15 @@ public void onComplete(@NonNull Task<AuthResult> task) {
122122 if (experienceLevel .equals ("Advanced" ))
123123 experienceLevelDouble = 5 ;
124124 user = new User (name , surname , nickname , email , password , favouriteSport , experienceLevelDouble , 2.5 );
125- Toast .makeText (registrationSurveyActivity .this , "Registration successful " , Toast .LENGTH_SHORT ).show ();
125+ Toast .makeText (registrationSurveyActivity .this , R . string . registrationSuccess , Toast .LENGTH_SHORT ).show ();
126126 Log .d (TAG , "FINO A QUI TUTTO BENE" );
127127 //aggiungo l'utente a firebase db
128128 addDataToFirebase ();
129129 //apro pickappActivity
130130 openPickappActivity ();
131131 }else {
132132 //registrazione fallita
133- Toast .makeText (registrationSurveyActivity .this , "Registration failed " , Toast .LENGTH_SHORT ).show ();
133+ Toast .makeText (registrationSurveyActivity .this , R . string . registrationFailed , Toast .LENGTH_SHORT ).show ();
134134 Log .d (TAG , "else esterno" );
135135 }
136136 }
@@ -181,12 +181,12 @@ public void onDataChange(@NonNull DataSnapshot snapshot) {
181181 Log .d (TAG , "QUA VA COSì COSì" );
182182 //aggiungo l'utente al path "Users" con chiave Uid dell'autenticazione
183183 myRef .child (currentFirebaseUser .getUid ()).setValue (user );
184- Toast .makeText (registrationSurveyActivity .this , "data added" , Toast .LENGTH_SHORT ).show ();
184+ Toast .makeText (registrationSurveyActivity .this , R . string . dataAdded , Toast .LENGTH_SHORT ).show ();
185185 }
186186
187187 @ Override
188188 public void onCancelled (@ NonNull DatabaseError error ) {
189- Toast .makeText (registrationSurveyActivity .this , "Fail to add data " + error , Toast .LENGTH_SHORT ).show ();
189+ Toast .makeText (registrationSurveyActivity .this , R . string . dataAddFail , Toast .LENGTH_SHORT ).show ();
190190 }
191191 });
192192 }
0 commit comments