diff --git a/app/src/main/java/com/example/nemophila/ShopActivity.java b/app/src/main/java/com/example/nemophila/ShopActivity.java index 8b318df..bd9b992 100644 --- a/app/src/main/java/com/example/nemophila/ShopActivity.java +++ b/app/src/main/java/com/example/nemophila/ShopActivity.java @@ -114,23 +114,16 @@ } //Nemophilaから選択中のフレンドを受け取る - HashSet selectingFriend = ((Nemophila)getApplication()).getSelectFriends(); +// HashSet selectingFriend = ((Nemophila)getApplication()).getSelectFriends(); //テスト用にHashSetにフレンドを入力 -// HashSet selectingFriendTest = new HashSet<>(); + HashSet selectingFriend = new HashSet<>(); selectingFriend.add("1111"); selectingFriend.add("1113"); - //選択したフレンドの表示のための宣言 HashSet selectingFriendName = new HashSet<>(); -// //選択中に何かあれば表示 -// if(!(selectingFriend.isEmpty())) { -// TextView friendView = (TextView) findViewById(R.id.shopAcFriend); -// friendView.setText("選択中のフレンド:" + selectingFriendName); -// } - //postsDatasetを一旦クリアし、LiveDataから受け取ったデータを一つずつセット(重複しないように) postsDataset.clear(); @@ -171,10 +164,10 @@ } } - //フレンド名を表示する + //フレンド選択があればフレンド名を表示する if(!(selectingFriend.isEmpty())) { TextView friendView = (TextView) findViewById(R.id.shopAcFriend); - friendView.setText("選択中のフレンド:" + selectingFriendName); + friendView.setText("表示中のフレンド:" + selectingFriendName); } //RecyclerViewをonChangedが呼ばれるたび表示(アダプターを更新してRecyclerViewにセット)