package com.base.datarecovery.view

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

object XmlEx {
    fun Int.inflate(parent: ViewGroup, attachToRoot: Boolean = false): View {
        return LayoutInflater.from(parent.context).inflate(this, parent, attachToRoot)
    }

    fun Int.inflate(context: Context, attachToRoot: Boolean = false): View {
        return LayoutInflater.from(context).inflate(this, null, attachToRoot)
    }
}