Renaming BindableViewHolder to LifecycleViewHolder

This commit is contained in:
Denis Karmyshakov 2018-03-14 16:25:06 +03:00
parent 9b1275ceec
commit dc87783252
4 changed files with 8 additions and 8 deletions

View File

@ -28,9 +28,9 @@ import android.view.ViewGroup;
* Objects of such class controls creation and binding of specific type of RecyclerView's ViewHolders.
* Default {@link #getItemViewType} is generating on construction of object.
*
* @param <TViewHolder> Type of {@link BindableViewHolder} of delegate.
* @param <TViewHolder> Type of {@link LifecycleViewHolder} of delegate.
*/
public abstract class AdapterDelegate<TViewHolder extends BindableViewHolder> {
public abstract class AdapterDelegate<TViewHolder extends LifecycleViewHolder> {
private final int defaultItemViewType = ViewCompat.generateViewId();
@NonNull

View File

@ -11,10 +11,10 @@ import java.util.List;
* Such delegates are creating and binding ViewHolders for specific items.
* Default {@link #getItemViewType} is generating on construction of object.
*
* @param <TViewHolder> Type of {@link LifecycleOwner} of delegate;
* @param <TItem> Type of items to bind to {@link LifecycleOwner}s.
* @param <TViewHolder> Type of {@link LifecycleViewHolder} of delegate;
* @param <TItem> Type of items to bind to {@link LifecycleViewHolder}s.
*/
public abstract class ItemAdapterDelegate<TViewHolder extends BindableViewHolder, TItem> extends AdapterDelegate<TViewHolder> {
public abstract class ItemAdapterDelegate<TViewHolder extends LifecycleViewHolder, TItem> extends AdapterDelegate<TViewHolder> {
public ItemAdapterDelegate(@NonNull final LifecycleOwner lifecycleOwner) {
super(lifecycleOwner);

View File

@ -28,7 +28,7 @@ import android.view.View
* ViewHolder that implements {@link LifecycleOwner} and uses parent lifecycle
* object as bridge ([android.app.Activity], [android.support.v4.app.Fragment] etc.).
*/
open class BindableViewHolder(
open class LifecycleViewHolder(
private val lifecycleOwner: LifecycleOwner,
itemView: View
) : RecyclerView.ViewHolder(itemView), LifecycleOwner by lifecycleOwner

View File

@ -11,9 +11,9 @@ import java.util.List;
* Such delegates are creating and binding ViewHolders by position in adapter.
* Default {@link #getItemViewType} is generating on construction of object.
*
* @param <TViewHolder> Type of {@link BindableViewHolder} of delegate.
* @param <TViewHolder> Type of {@link LifecycleViewHolder} of delegate.
*/
public abstract class PositionAdapterDelegate<TViewHolder extends BindableViewHolder> extends AdapterDelegate<TViewHolder> {
public abstract class PositionAdapterDelegate<TViewHolder extends LifecycleViewHolder> extends AdapterDelegate<TViewHolder> {
public PositionAdapterDelegate(@NonNull final LifecycleOwner lifecycleOwner) {
super(lifecycleOwner);