Skip to content

Commit

Permalink
delete unused and ambigues companion object
Browse files Browse the repository at this point in the history
  • Loading branch information
pengdst committed Feb 3, 2021
1 parent cba4435 commit e3f6654
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ package io.github.pengdst.libs.ui.viewbinding.activity

import android.app.Activity
import android.view.LayoutInflater
import androidx.annotation.MainThread
import androidx.fragment.app.Fragment
import androidx.viewbinding.ViewBinding
import io.github.pengdst.libs.ui.viewbinding.fragment.FragmentViewBindingDelegate
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty

Expand All @@ -22,15 +19,6 @@ import kotlin.reflect.KProperty
class ActivityViewBindingDelegate<T : ViewBinding>(private val bindingClass: Class<T>) :
ReadOnlyProperty<Activity, T> {

companion object Extension {
@MainThread
inline fun <reified T : ViewBinding> Fragment.viewBindings(): FragmentViewBindingDelegate<T> =
FragmentViewBindingDelegate(
fragment = this,
viewBindingClazz = T::class.java
)
}

/**
* initiate variable for binding view
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class FragmentViewBindingDelegate<T : ViewBinding>(
viewBindingClazz: Class<T>? = null
) : ReadOnlyProperty<Fragment, T> {

companion object {
}

private var binding: T? = null
private val inflateMethod: (LayoutInflater)->T

Expand Down

0 comments on commit e3f6654

Please sign in to comment.