diff --git a/app/src/main/java/com/example/nemophila/MyPageActivity.java b/app/src/main/java/com/example/nemophila/MyPageActivity.java index 4f786e9..75a2f79 100644 --- a/app/src/main/java/com/example/nemophila/MyPageActivity.java +++ b/app/src/main/java/com/example/nemophila/MyPageActivity.java @@ -159,7 +159,7 @@ for (Post post: Posts){ MyPageActDataModel data = new MyPageActDataModel(); data.setDate(post.getDate()); - data.setName(post.getShopName()); + data.setShopName(post.getShopName()); data.setGenre(post.getGenre()); //rateはintで受け取った評価に対応した星の数のStringに変換してセット int intRate = post.getRate(); @@ -266,7 +266,7 @@ @Override public void onBindViewHolder(@NonNull MyPageActViewHolder holder, int position) { - holder.nameView.setText(list.get(position).getName()); + holder.shopNameView.setText(list.get(position).getShopName()); holder.dateView.setText(list.get(position).getDate()); holder.rateView.setText(list.get(position).getRate()); holder.genreView.setText(list.get(position).getGenre()); @@ -284,7 +284,7 @@ // ViewHolder public class MyPageActViewHolder extends RecyclerView.ViewHolder { - public TextView nameView; + public TextView shopNameView; public TextView dateView; public TextView rateView; public TextView genreView; @@ -296,7 +296,7 @@ public MyPageActViewHolder(@NonNull View view) { super(view); - nameView = (TextView) view.findViewById(R.id.nameOfShop); + shopNameView = (TextView) view.findViewById(R.id.nameOfShop); dateView = (TextView) view.findViewById(R.id.date); rateView = (TextView) view.findViewById(R.id.rate); genreView = (TextView) view.findViewById(R.id.genre); @@ -310,7 +310,7 @@ // DataModel public static class MyPageActDataModel { - private String name; + private String shopName; private String date; private String rate; private String genre; @@ -320,8 +320,8 @@ private Bitmap image2; private Bitmap image3; - public String getName() { return name; } - public void setName(String name) { this.name = name; } + public String getShopName() { return shopName; } + public void setShopName(String shopName) { this.shopName = shopName; } public String getDate() { return date;