Page 120 - MDP2022-2
P. 120
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class SubActivity extends AppCompatActivity {
private EditText register_id;
private EditText register_pw;
private EditText register_name;
private EditText register_phone;
private TextView sameid;
private TextView notsameid;
private ImageView bt;
private Button check;
int a;
private static final String TAG = "[ INTEC ]";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sub);
sameid = findViewById(R.id.sameid);
notsameid = findViewById(R.id.notsameid);
bt = findViewById(R.id.move);
register_id = findViewById(R.id.id2);
register_pw = findViewById(R.id.pw2);
register_name = findViewById(R.id.name);
register_phone = findViewById(R.id.phone);
check = findViewById(R.id.check);
check.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
SubActivity.GetData task = new SubActivity.GetData();
String data_id = register_id.getText().toString();
task.execute(data_id,"NONO","","");
}
});
bt.setOnClickListener(new View.OnClickListener() {