File tree 3 files changed +26
-1
lines changed
java/com/example/souravkumarbehera/cetbusservice
3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public void loginClicked(View view) {
37
37
if (un .equals ("skbisoi@cetb" ) && pw .equals ("cetb1234" )) {
38
38
Intent next = new Intent (AdminLogin .this , AdminPage .class );
39
39
startActivity (next );
40
+ password .setText ("" );
40
41
}
41
42
else {
42
43
count ++;
Original file line number Diff line number Diff line change 2
2
3
3
import android .support .v7 .app .AppCompatActivity ;
4
4
import android .os .Bundle ;
5
+ import android .view .View ;
6
+ import android .widget .Button ;
7
+ import android .widget .EditText ;
8
+ import android .widget .TextView ;
9
+ import android .widget .Toast ;
5
10
6
11
public class ForgetPassword extends AppCompatActivity {
7
12
13
+ EditText firstAns , secondAns ;
14
+ Button getPassword ;
15
+ TextView UAndP ;
16
+ public void getClicked (View view ){
17
+ String ansOne ,ansTwo ;
18
+ ansOne =firstAns .getText ().toString ();
19
+ ansTwo =secondAns .getText ().toString ();
20
+ if (ansOne .equals ("Sonu" ) && ansTwo .equals ("Rony" )){
21
+ UAndP .setText ("skbisoi@cetb\n cetb1234" );
22
+ }
23
+ else {
24
+ Toast .makeText (ForgetPassword .this ,"Wrong Answer" ,Toast .LENGTH_SHORT ).show ();
25
+ }
26
+ }
8
27
@ Override
9
28
protected void onCreate (Bundle savedInstanceState ) {
10
29
super .onCreate (savedInstanceState );
11
30
setContentView (R .layout .activity_forget_password );
31
+ firstAns =(EditText )findViewById (R .id .firstAns );
32
+ secondAns =(EditText )findViewById (R .id .secondAns );
33
+ getPassword =(Button )findViewById (R .id .getPassword );
34
+ UAndP =(TextView )findViewById (R .id .UAndP );
12
35
}
13
36
}
Original file line number Diff line number Diff line change 55
55
android : text =" GET"
56
56
android : id =" @+id/getPassword"
57
57
android : textSize =" 30dp"
58
+ android : onClick =" getClicked"
58
59
/>
59
60
60
61
<TextView
64
65
android : layout_alignParentBottom =" true"
65
66
android : layout_centerHorizontal =" true"
66
67
android : layout_marginBottom =" 41dp"
67
- android : hint =" Username\nPasswrd "
68
+ android : hint =" Username\nPassword "
68
69
android : textAlignment =" center"
69
70
android : textSize =" 30dp" />
70
71
You can’t perform that action at this time.
0 commit comments