| |
---|
| | //投稿ボタンの処理 |
---|
| | Button postButton = (Button)findViewById(R.id.postButton); |
---|
| | postButton.setOnClickListener(new View.OnClickListener(){ |
---|
| | public void onClick(View v){ |
---|
| | postButton.setEnabled(false); |
---|
| | System.out.println("投稿ボタンのクリック"); |
---|
| | |
---|
| | EditText editComment = (EditText) findViewById(R.id.inputComment); |
---|
| | comment = editComment.getText().toString(); |
---|
| |
---|
| | img[i] = encoded; |
---|
| | |
---|
| | } catch (FileNotFoundException e) { |
---|
| | e.printStackTrace(); |
---|
| | postButton.setEnabled(true); |
---|
| | } |
---|
| | } |
---|
| | |
---|
| | if (shop == null) { |
---|
| |
---|
| | }else if(rate == 0) { |
---|
| | //評価未入力 |
---|
| | System.out.println("評価未設定クリック"); |
---|
| | Snackbar.make(v, "評価を選択してください", Snackbar.LENGTH_SHORT).show(); |
---|
| | postButton.setEnabled(true); |
---|
| | }else if (genre == null){ |
---|
| | //ジャンル未入力 |
---|
| | System.out.println("ジャンル未設定クリック"); |
---|
| | Snackbar.make(v, "ジャンルを選択してください", Snackbar.LENGTH_SHORT).show(); |
---|
| | postButton.setEnabled(true); |
---|
| | } |
---|
| | } |
---|
| | }); |
---|
| | } |
---|
| | |
確認お願いします
PostActivityにて、投稿ボタンを押した際に通信が終わるまでに再度ボタンを押して重複して投稿をしてしまわないように修正
97d7c3e
intomaster
frompost
on 24 Oct 2023post
branch on 24 Oct 2023