package com.example.citrusclient.views; import android.os.Bundle; import android.view.View; import android.widget.EditText; import androidx.activity.EdgeToEdge; import androidx.appcompat.app.AppCompatActivity; import androidx.core.graphics.Insets; import androidx.core.view.ViewCompat; import androidx.core.view.WindowInsetsCompat; import com.example.citrusclient.R; public class SignUpActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); EdgeToEdge.enable(this); setContentView(R.layout.activity_sign_up); ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); return insets; }); findViewById(R.id.button_signup).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //IDとPWの登録 EditText editid = (EditText) findViewById(R.id.text_id); String id = editid.getText().toString().trim(); EditText editpw = (EditText) findViewById(R.id.put_pw); String pw = editpw.getText().toString().trim(); if(!id.isEmpty() && !pw.isEmpty() && !id.trim().isEmpty() && !pw.trim().isEmpty() ){ //通信 } } }); } }