-
Notifications
You must be signed in to change notification settings - Fork 0
/
UserInfo.java
58 lines (43 loc) · 1.75 KB
/
UserInfo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package org.colibrisoft.colibri;
import android.content.Intent;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class UserInfo extends AppCompatActivity {
protected EditText user_first_name;
protected String Name;
protected EditText User_Name1;
protected EditText User_Name2;
protected String FirstName, LastName;
protected String Full_Number;
private TextView mNameError;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_info);
user_first_name= (EditText) findViewById(R.id.user_first_name);
mNameError = (TextView) findViewById(R.id.name_error);
}
public void phone_num(View v) {
Intent j = new Intent(this, Phone.class);
Name = user_first_name.getText().toString();
User_Name1 = (EditText) findViewById(R.id.user_first_name);
User_Name2 = (EditText) findViewById(R.id.user_last_name);
FirstName = User_Name1.getText().toString();
LastName = User_Name2.getText().toString();
/*Full_Number = getIntent().getExtras().getString("Phone_Nav");
j.putExtra("Phone_Nav2",Full_Number);*/
if (!(FirstName.isEmpty())) {
j.putExtra("FullName", FirstName + " " + LastName);
startActivity(j);
finish();
} else {
mNameError.setText("First name is required");
mNameError.setVisibility (View.VISIBLE);
mNameError.requestFocus();
}
}
}