1
+ package com .example .fitappa ;
2
+
3
+ import android .content .Intent ;
4
+ import android .os .Bundle ;
5
+ import android .view .View ;
6
+ import android .widget .TextView ;
7
+ import androidx .appcompat .app .AppCompatActivity ;
8
+ import com .google .android .material .textfield .TextInputEditText ;
9
+ import fitappfiles .Profiles ;
10
+
11
+ import java .util .Observable ;
12
+ import java .util .Observer ;
13
+
14
+
15
+ public class InteractorCreateAccount extends AppCompatActivity {
16
+ private TextInputEditText user ;
17
+ private TextInputEditText pass ;
18
+ private TextInputEditText mail ;
19
+ private TextView enter ;
20
+ private Profiles profiles ;
21
+ private ModelProfile Mprofile ;
22
+
23
+ @ Override
24
+ protected void onCreate (Bundle savedInstanceState ) {
25
+ super .onCreate (savedInstanceState );
26
+ setContentView (R .layout .create_account );
27
+ this .profiles = new Profiles ();
28
+ this .Mprofile = new ModelProfile ();
29
+
30
+
31
+ user = findViewById (R .id .userName );
32
+ pass = findViewById (R .id .password );
33
+ mail = findViewById (R .id .email );
34
+ enter = findViewById (R .id .submit );
35
+
36
+ enter .setOnClickListener (new View .OnClickListener () {
37
+ @ Override
38
+ public void onClick (View v ) {
39
+ createA (user .getText ().toString (),pass .getText ().toString (),mail .getText ().toString ());
40
+ }
41
+ });
42
+
43
+ }
44
+
45
+ private void createA (String username , String password , String email ) {
46
+ System .out .println (this .profiles .signUp (username ,password ,email ));
47
+
48
+ Intent intent = new Intent (this , InteractorProfile .class );
49
+ startActivity (intent );
50
+ }
51
+
52
+ }
0 commit comments