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 857f8fa..f98784d 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 @@ -77,16 +77,17 @@ System.out.println("//////////////////////////////////////////////"); System.out.println(response); -// if(response.toString().matches(".*\"login\":true,\".*")){ -// Toast.makeText(getActivity(),"ログインに成功しました。", Toast.LENGTH_SHORT).show(); -// }else { -// Toast.makeText(getActivity(),"ログインに失敗しました。", Toast.LENGTH_SHORT).show(); -// } - - if(response.contains("\"login\":true,")){ Toast.makeText(getActivity(),"ログインに成功しました。", Toast.LENGTH_SHORT).show(); + + FragmentManager manager = getFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + + transaction.replace(R.id.InstancesFragment, new InstancesFragment()); + + transaction.commit(); + }else { Toast.makeText(getActivity(),"ログインに失敗しました。", Toast.LENGTH_SHORT).show(); }