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 f98784d..ecd5c80 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 @@ -16,6 +16,7 @@ import org.ntlab.radishforandroidstudio.R; import org.ntlab.radishforandroidstudio.cactusClient.connections.LoginFragmentConnection; +import org.ntlab.radishforandroidstudio.cactusClient.views.InstancesFragment; import org.ntlab.radishforandroidstudio.cactusClient.models.URIAddressedEntity; import org.ntlab.radishforandroidstudio.framework.network.CallBack; @@ -81,16 +82,17 @@ 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(); } + + FragmentManager manager = getFragmentManager(); + FragmentTransaction transaction = manager.beginTransaction(); + + transaction.replace(R.id.fragment_place, new InstancesFragment()); + + transaction.commit(); } }); connection.addFormParam("userID", userName.getText().toString()); @@ -99,6 +101,5 @@ } } }); - } }