diff --git a/app/src/main/java/com/example/cosmosclient/views/JoinGroupByIDActivity.java b/app/src/main/java/com/example/cosmosclient/views/JoinGroupByIDActivity.java index 96fc61f..c6fe679 100644 --- a/app/src/main/java/com/example/cosmosclient/views/JoinGroupByIDActivity.java +++ b/app/src/main/java/com/example/cosmosclient/views/JoinGroupByIDActivity.java @@ -27,7 +27,7 @@ super.onCreate(savedInstanceState); setContentView(R.layout.activity_join_group_by_id); //テストでグループIDを出力 - final TextView result = (TextView)findViewById(R.id.IDresult); + final TextView test = (TextView)findViewById(R.id.IDresult); //buttonを取得 Button btn = (Button)findViewById(R.id.button); btn.setOnClickListener(new View.OnClickListener() { @@ -36,7 +36,7 @@ //ボタンを押されると入力されたグループIDを取得 EditText inputGroupID = (EditText)findViewById(R.id.inputGroupID); GroupID = inputGroupID.getText().toString(); - result.setText(GroupID); + test.setText(GroupID); //retrofitの処理 Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/cosmos/") @@ -57,12 +57,13 @@ @Override public void onResponse(Call call, Response response) { if (response.isSuccessful()) { - // JoinGroupResponse result = response.body(); - result.setText("成功"); -// Cosmos app = (Cosmos) getApplication(); +// JoinGroupResponse result = response.body(); + test.setText("成功"); + Cosmos app = (Cosmos) getApplication(); // Intent intent = new Intent(getApplication(), GroupListActivity.class); //test +// System.out.println(result.gId); // System.out.println(result.uId); // System.out.println(result.name); // System.out.println(result.uri); @@ -71,12 +72,12 @@ // System.out.println(result.pw); //ここで成功の処理を記述 - finish(); +// finish(); } else { //onFailureでキャッチできないエラー用 //ここでエラーの処理を記述 - result.setText("失敗"); + test.setText("失敗"); } } @@ -88,7 +89,7 @@ t.printStackTrace(); Toast.makeText(JoinGroupByIDActivity.this, "アカウント作成失敗",Toast.LENGTH_SHORT); - result.setText("超失敗"); + test.setText("超失敗"); } });