diff --git a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java index 7757e5e..71d9ee8 100644 --- a/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java +++ b/app/src/main/java/org/ntlab/radishforandroidstudio/cactusClient/views/LoginFragment.java @@ -89,16 +89,18 @@ if(response.contains("\"login\":true,")){ Toast.makeText(getActivity(),"ログインに成功しました。", Toast.LENGTH_SHORT).show(); + + FragmentManager manager = getFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + + transaction.replace(R.id.fragment_place, new InstancesFragment()); + + transaction.commit(); + }else { Toast.makeText(getActivity(),"ログインに失敗しました。", Toast.LENGTH_SHORT).show(); } - FragmentManager manager = getFragmentManager(); - FragmentTransaction transaction = manager.beginTransaction(); - - transaction.replace(R.id.fragment_place, new InstancesFragment()); - - transaction.commit(); } }); connection.addFormParam("userID", userName.getText().toString());