Skip to content

Commit 9304b17

Browse files
committed
Add extension method for view
1 parent 6344166 commit 9304b17

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

extensionslib/src/main/java/com/omega_r/libs/extensions/view/ViewExtensions.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ import androidx.annotation.LayoutRes
66

77
fun View.inflate(@LayoutRes resource: Int, root: ViewGroup): View {
88
return View.inflate(context, resource, root)
9+
}
10+
11+
fun View.inflate(@LayoutRes resource: Int): View {
12+
return View.inflate(context, resource, null)
913
}

0 commit comments

Comments
 (0)