Skip to content

Commit

Permalink
Use Core ViewHolder
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianDevel committed Oct 24, 2023
1 parent 4c9c101 commit 35361a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import com.infomaniak.drive.utils.Utils
import com.infomaniak.drive.utils.setFileItem
import com.infomaniak.lib.core.utils.context
import com.infomaniak.lib.core.utils.setMargins
import com.infomaniak.lib.core.views.ViewHolder

class SaveExternalUriAdapter(val uris: MutableList<Pair<Uri, String>>) : RecyclerView.Adapter<SaveExternalUriViewHolder>() {

Expand Down Expand Up @@ -94,5 +95,5 @@ class SaveExternalUriAdapter(val uris: MutableList<Pair<Uri, String>>) : Recycle
}
}

class SaveExternalUriViewHolder(val binding: CardviewFileListBinding) : RecyclerView.ViewHolder(binding.root)
class SaveExternalUriViewHolder(val binding: CardviewFileListBinding) : ViewHolder(binding.root)
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import com.infomaniak.drive.R
import com.infomaniak.drive.data.models.drive.Drive
import com.infomaniak.drive.databinding.ItemSelectBottomSheetBinding
import com.infomaniak.drive.utils.AccountUtils
import com.infomaniak.lib.core.views.ViewHolder
import kotlinx.android.synthetic.main.item_select_bottom_sheet.view.itemSelectActiveIcon
Expand Down Expand Up @@ -56,4 +57,6 @@ class SwitchDriveBottomSheetAdapter(

setOnClickListener { onItemClicked(drive) }
}

class SwitchDriveBottomSheetViewHolder(val binding: ItemSelectBottomSheetBinding) : ViewHolder(binding.root)
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import com.infomaniak.drive.R
import com.infomaniak.drive.databinding.CardviewCategoryBinding
import com.infomaniak.drive.ui.fileList.fileDetails.CategoriesAdapter.CategoriesViewHolder
import com.infomaniak.drive.utils.setCornersRadius
import com.infomaniak.lib.core.views.ViewHolder
import java.util.Date

class CategoriesAdapter(
Expand Down Expand Up @@ -213,5 +214,5 @@ class CategoriesAdapter(
}
}

class CategoriesViewHolder(val binding: CardviewCategoryBinding) : RecyclerView.ViewHolder(binding.root)
class CategoriesViewHolder(val binding: CardviewCategoryBinding) : ViewHolder(binding.root)
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.infomaniak.drive.R
import com.infomaniak.drive.databinding.ViewColorRoundButtonBinding
import com.infomaniak.drive.ui.fileList.fileDetails.CreateOrEditCategoryAdapter.CategoriesBulletViewHolder
import com.infomaniak.lib.core.views.ViewHolder

class CreateOrEditCategoryAdapter : RecyclerView.Adapter<CategoriesBulletViewHolder>() {

Expand Down Expand Up @@ -80,5 +81,5 @@ class CreateOrEditCategoryAdapter : RecyclerView.Adapter<CategoriesBulletViewHol
)
}

class CategoriesBulletViewHolder(val binding: ViewColorRoundButtonBinding) : RecyclerView.ViewHolder(binding.root)
class CategoriesBulletViewHolder(val binding: ViewColorRoundButtonBinding) : ViewHolder(binding.root)
}

0 comments on commit 35361a3

Please sign in to comment.