---
title: "Discussion on \"How to use View Binding on custom views\" | Hashnode"
description: "Discussion on \"How to use View Binding on custom views\". class CustomItemHome(context: Context, attrs: AttributeSet) : ConstraintLayout(context, attrs) {\n\n    private var binding: CustomItemHomeViewBinding\n\n    init {\n        View.inflate(context, R.layout.custom_item_home_view, this)\n        binding = Cus..."
url: "https://hashnode.com/posts/how-to-use-view-binding-on-custom-views/655dd89cac2ac7fe27b384c8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to use View Binding on custom views](https://hungson.hashnode.dev/how-to-use-view-binding-on-custom-views?utm_source=hashnode&utm_medium=feed)

class CustomItemHome(context: Context, attrs: AttributeSet) : ConstraintLayout(context, attrs) { private var binding: CustomItemHomeViewBinding init { View.inflate(context, R.layout.custom\_item\_home\_view, this) binding = Cus...

Nov 22, 2023 · 1 min read · hungson.hashnode.dev  
Read the article

## Written by

[Hung Son](https://hashnode.com/@hungson)

@hungson · Viet nam

  
[View profile](https://hashnode.com/@hungson)

Mobile developer

I'am mobile developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
