From 6acaecb008e77b6961faa8ae75b807df4e9ecdb2 Mon Sep 17 00:00:00 2001 From: Fabian Devel Date: Mon, 30 Oct 2023 15:32:40 +0100 Subject: [PATCH] Delete custom ViewHolder used for kotlinx Extension --- .../lib/core/views/LoaderAdapter.kt | 11 +++------ .../infomaniak/lib/core/views/ViewHolder.kt | 23 ------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 src/main/java/com/infomaniak/lib/core/views/ViewHolder.kt diff --git a/src/main/java/com/infomaniak/lib/core/views/LoaderAdapter.kt b/src/main/java/com/infomaniak/lib/core/views/LoaderAdapter.kt index 0153b080..58056e11 100644 --- a/src/main/java/com/infomaniak/lib/core/views/LoaderAdapter.kt +++ b/src/main/java/com/infomaniak/lib/core/views/LoaderAdapter.kt @@ -15,12 +15,11 @@ */ package com.infomaniak.lib.core.views -import android.view.LayoutInflater import android.view.ViewGroup -import androidx.recyclerview.widget.RecyclerView -import com.infomaniak.lib.core.R +import androidx.recyclerview.widget.RecyclerView.Adapter +import androidx.recyclerview.widget.RecyclerView.ViewHolder -abstract class LoaderAdapter : RecyclerView.Adapter() { +abstract class LoaderAdapter : Adapter() { private var showLoading = false val itemList: ArrayList = ArrayList() @@ -66,9 +65,5 @@ abstract class LoaderAdapter : RecyclerView.Adapter() { const val VIEW_TYPE_LOADING = 1 const val VIEW_TYPE_NORMAL = 2 - - fun createLoadingViewHolder(parent: ViewGroup): ViewHolder { - return ViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.item_loading, parent, false)) - } } } diff --git a/src/main/java/com/infomaniak/lib/core/views/ViewHolder.kt b/src/main/java/com/infomaniak/lib/core/views/ViewHolder.kt deleted file mode 100644 index e6476920..00000000 --- a/src/main/java/com/infomaniak/lib/core/views/ViewHolder.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Infomaniak Core - Android - * Copyright (C) 2022 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.infomaniak.lib.core.views - -import android.view.View -import androidx.recyclerview.widget.RecyclerView - -open class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)