diff --git a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/LoginFragment.java b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/LoginFragment.java index fd3e695..b86e81e 100644 --- a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/LoginFragment.java +++ b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/LoginFragment.java @@ -5,10 +5,13 @@ import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; import org.ntlab.radishforandroidstudio.R; @@ -22,12 +25,15 @@ } - //↓↓↓↓↓↓↓↓画面遷移↓↓↓↓↓↓↓↓ + @Override public void onStart() { super.onStart(); Button button = (Button)getActivity().findViewById(R.id.signUP1); + + + //↓↓↓↓↓↓↓↓画面遷移↓↓↓↓↓↓↓↓ button.setOnClickListener(new View.OnClickListener() { @Override @@ -42,6 +48,27 @@ transaction.commit(); } }); + //↑↑↑↑↑画面遷移↑↑↑↑↑↑ + + Button loginButton = (Button)getActivity().findViewById(R.id.login); + loginButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + EditText userName = (EditText)getActivity().findViewById(R.id.inputUserName); + EditText passWord = (EditText)getActivity().findViewById(R.id.inputPassword); + + CharSequence userNameText = userName.getText(); + CharSequence passWordText = passWord.getText(); + + + Toast tp = Toast.makeText(getActivity(), passWordText, Toast.LENGTH_SHORT); + tp.setGravity(Gravity.TOP, 0, 0); + tp.show(); + + } + }); + + } }