diff --git a/app/src/main/java/com/example/cosmosclient/views/AddRequestActivity.java b/app/src/main/java/com/example/cosmosclient/views/AddRequestActivity.java index b0a300f..cc32455 100644 --- a/app/src/main/java/com/example/cosmosclient/views/AddRequestActivity.java +++ b/app/src/main/java/com/example/cosmosclient/views/AddRequestActivity.java @@ -138,7 +138,7 @@ //retrofitの処理 final Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/cosmos/") -// .baseUrl("http://10.0.2.2:8080/") +// .baseUrl("http://localhost:8080/") .addConverterFactory(JacksonConverterFactory.create()) .build(); @@ -167,6 +167,7 @@ public void onResponse(Call call, Response response) { if (response.isSuccessful()) { AddRequestsResponse result = response.body(); + finish(); Toast.makeText(AddRequestActivity.this, "RequestListに追加しました", Toast.LENGTH_SHORT).show(); } else { @@ -188,8 +189,6 @@ Toast.makeText(AddRequestActivity.this, "RequestListの追加失敗しました", Toast.LENGTH_SHORT).show(); } }); - - finish(); } });