File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .lenovo .demoapp ;
2
+
3
+ import android .support .v7 .app .AppCompatActivity ;
4
+ import android .os .Bundle ;
5
+ import android .util .Log ;
6
+ import android .view .View ;
7
+ import android .widget .EditText ;
8
+ import android .widget .Toast ;
9
+
10
+
11
+ public class MainActivity extends AppCompatActivity {
12
+
13
+ public void clickFunction (View view )
14
+ {
15
+ Toast .makeText (MainActivity .this ,"hi there !" ,Toast .LENGTH_SHORT ).show ();
16
+
17
+ EditText myTextField = (EditText ) findViewById (R .id .UserName );
18
+ EditText myPassword = (EditText ) findViewById (R .id .Password );
19
+
20
+
21
+ Toast .makeText (MainActivity .this ,"Username : " +myTextField .getText ().toString ()+ " Password: " +myPassword .getText ().toString () ,Toast .LENGTH_SHORT ).show ();
22
+ //Log.i("Info","Button Pressed!");
23
+ Log .i ("Info" ,"Username : " +myTextField .getText ().toString ()+ " Password: " +myPassword .getText ().toString ());
24
+ }
25
+ @ Override
26
+ protected void onCreate (Bundle savedInstanceState ) {
27
+ super .onCreate (savedInstanceState );
28
+ setContentView (R .layout .activity_main );
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments