-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPhone.java
More file actions
58 lines (40 loc) · 1.56 KB
/
Copy pathPhone.java
File metadata and controls
58 lines (40 loc) · 1.56 KB
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.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.hbb20.CountryCodePicker;
public class Phone extends AppCompatActivity {
private Button phone_button;
private CountryCodePicker ccp;
private EditText phone_num;
protected String phoneNum;
private TextView mPhoneError;
private String FullNameVal;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_phone);
phone_button= (Button) findViewById(R.id.phone_button);
ccp = (CountryCodePicker) findViewById(R.id.ccp);
phone_num = (EditText) findViewById(R.id.phone_num);
mPhoneError = (TextView) findViewById(R.id.invalid_phone);
FullNameVal = getIntent().getExtras().getString("FullName");
}
public void verify(View v){
Intent i = new Intent(this, Verification.class);
ccp.registerCarrierNumberEditText(phone_num);
if(ccp.isValidFullNumber()){
i.putExtra("Value", ccp.getFormattedFullNumber());
i.putExtra("UserName", FullNameVal);
startActivity(i);
finish();
} else {
phone_num.setError("Enter valid phone number");
phone_num.requestFocus();
}
}
}