diff --git a/app/src/main/java/com/battlelancer/seriesguide/movies/MovieViewHolder.kt b/app/src/main/java/com/battlelancer/seriesguide/movies/MovieViewHolder.kt index a99518c1d6..3f3b51a49c 100644 --- a/app/src/main/java/com/battlelancer/seriesguide/movies/MovieViewHolder.kt +++ b/app/src/main/java/com/battlelancer/seriesguide/movies/MovieViewHolder.kt @@ -1,5 +1,5 @@ -// Copyright 2023 Uwe Trottmann // SPDX-License-Identifier: Apache-2.0 +// Copyright 2019-2024 Uwe Trottmann package com.battlelancer.seriesguide.movies @@ -9,7 +9,7 @@ import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.RecyclerView import com.battlelancer.seriesguide.R -import com.battlelancer.seriesguide.databinding.ItemDiscoverMovieBinding +import com.battlelancer.seriesguide.databinding.ItemMovieBinding import com.battlelancer.seriesguide.movies.database.SgMovie import com.battlelancer.seriesguide.util.ImageTools import com.squareup.picasso.Picasso @@ -17,7 +17,7 @@ import com.uwetrottmann.tmdb2.entities.BaseMovie import java.text.DateFormat class MovieViewHolder( - val binding: ItemDiscoverMovieBinding, + val binding: ItemMovieBinding, itemClickListener: MovieClickListener? ) : RecyclerView.ViewHolder(binding.root) { @@ -107,7 +107,7 @@ class MovieViewHolder( @JvmStatic fun inflate(parent: ViewGroup, itemClickListener: MovieClickListener?): MovieViewHolder { return MovieViewHolder( - ItemDiscoverMovieBinding.inflate( + ItemMovieBinding.inflate( LayoutInflater.from(parent.context), parent, false ), itemClickListener diff --git a/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesBaseFragment.kt b/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesBaseFragment.kt index 2c235b9b43..2703daa2d4 100644 --- a/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesBaseFragment.kt +++ b/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesBaseFragment.kt @@ -29,7 +29,7 @@ import org.greenrobot.eventbus.ThreadMode */ abstract class MoviesBaseFragment : Fragment() { - private lateinit var adapter: MoviesWatchedAdapter + private lateinit var adapter: MoviesAdapter abstract val model: MoviesWatchedViewModel @@ -51,7 +51,7 @@ abstract class MoviesBaseFragment : Fragment() { emptyView.setText(emptyViewTextResId) - adapter = MoviesWatchedAdapter(requireContext(), MovieClickListenerImpl(requireContext())) + adapter = MoviesAdapter(requireContext(), MovieClickListenerImpl(requireContext())) recyclerView.also { it.setHasFixedSize(true) diff --git a/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesDiscoverAdapter.java b/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesDiscoverAdapter.java index d57c6817c6..8ab563786f 100644 --- a/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesDiscoverAdapter.java +++ b/app/src/main/java/com/battlelancer/seriesguide/movies/MoviesDiscoverAdapter.java @@ -1,5 +1,5 @@ -// Copyright 2023 Uwe Trottmann // SPDX-License-Identifier: Apache-2.0 +// Copyright 2017-2024 Uwe Trottmann package com.battlelancer.seriesguide.movies; @@ -24,7 +24,7 @@ public class MoviesDiscoverAdapter extends RecyclerView.Adapter + tools:listitem="@layout/item_movie" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_movies_discover.xml b/app/src/main/res/layout/fragment_movies_discover.xml index 3a40fb4b51..6fc8e27a60 100644 --- a/app/src/main/res/layout/fragment_movies_discover.xml +++ b/app/src/main/res/layout/fragment_movies_discover.xml @@ -15,6 +15,6 @@ android:paddingLeft="@dimen/grid_item_margin_horizontal" android:paddingRight="@dimen/grid_item_margin_horizontal" android:paddingTop="@dimen/grid_item_margin_vertical" - tools:listitem="@layout/item_discover_movie" /> + tools:listitem="@layout/item_movie" /> diff --git a/app/src/main/res/layout/fragment_movies_search.xml b/app/src/main/res/layout/fragment_movies_search.xml index 05d1cea2df..e0e0916cc2 100644 --- a/app/src/main/res/layout/fragment_movies_search.xml +++ b/app/src/main/res/layout/fragment_movies_search.xml @@ -37,7 +37,7 @@ android:paddingTop="@dimen/grid_item_margin_vertical" android:paddingRight="@dimen/grid_item_margin_horizontal" android:paddingBottom="40dp" - tools:listitem="@layout/item_discover_movie" /> + tools:listitem="@layout/item_movie" /> + tools:listitem="@layout/item_movie" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_movies_watchlist.xml b/app/src/main/res/layout/fragment_movies_watchlist.xml index ee11bd9301..a61e30a0c5 100644 --- a/app/src/main/res/layout/fragment_movies_watchlist.xml +++ b/app/src/main/res/layout/fragment_movies_watchlist.xml @@ -24,6 +24,6 @@ android:paddingTop="@dimen/grid_item_margin_vertical" android:paddingRight="@dimen/grid_item_margin_horizontal" android:paddingBottom="@dimen/grid_item_margin_vertical" - tools:listitem="@layout/item_discover_movie" /> + tools:listitem="@layout/item_movie" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_discover_movie.xml b/app/src/main/res/layout/item_movie.xml similarity index 100% rename from app/src/main/res/layout/item_discover_movie.xml rename to app/src/main/res/layout/item_movie.xml diff --git a/app/src/main/res/layout/layout_movie.xml b/app/src/main/res/layout/layout_movie.xml index 319ba01585..91dca4f0b4 100644 --- a/app/src/main/res/layout/layout_movie.xml +++ b/app/src/main/res/layout/layout_movie.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - tools:showIn="@layout/item_discover_movie"> + tools:showIn="@layout/item_movie">