From 859d1574c9346dbbc4651dced754431a3d85c532 Mon Sep 17 00:00:00 2001 From: skydoves Date: Mon, 12 Apr 2021 16:20:21 +0900 Subject: [PATCH] Add CallSuper annotation for forcing to call super.onCreateView in binding fragments --- .../com/skydoves/bindables/BindingBottomSheetDialogFragment.kt | 2 ++ .../main/java/com/skydoves/bindables/BindingDialogFragment.kt | 2 ++ .../src/main/java/com/skydoves/bindables/BindingFragment.kt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/bindables/src/main/java/com/skydoves/bindables/BindingBottomSheetDialogFragment.kt b/bindables/src/main/java/com/skydoves/bindables/BindingBottomSheetDialogFragment.kt index cac74b3..871f760 100644 --- a/bindables/src/main/java/com/skydoves/bindables/BindingBottomSheetDialogFragment.kt +++ b/bindables/src/main/java/com/skydoves/bindables/BindingBottomSheetDialogFragment.kt @@ -20,6 +20,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.annotation.CallSuper import androidx.annotation.LayoutRes import androidx.databinding.DataBindingComponent import androidx.databinding.DataBindingUtil @@ -70,6 +71,7 @@ abstract class BindingBottomSheetDialogFragment constructor /** * Ensures the [binding] property should be executed and provide the inflated view which depends on [contentLayoutId]. */ + @CallSuper override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/bindables/src/main/java/com/skydoves/bindables/BindingDialogFragment.kt b/bindables/src/main/java/com/skydoves/bindables/BindingDialogFragment.kt index ee12a4d..73e19f7 100644 --- a/bindables/src/main/java/com/skydoves/bindables/BindingDialogFragment.kt +++ b/bindables/src/main/java/com/skydoves/bindables/BindingDialogFragment.kt @@ -20,6 +20,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.annotation.CallSuper import androidx.annotation.LayoutRes import androidx.databinding.DataBindingComponent import androidx.databinding.DataBindingUtil @@ -70,6 +71,7 @@ abstract class BindingDialogFragment constructor( /** * Ensures the [binding] property should be executed and provide the inflated view which depends on [contentLayoutId]. */ + @CallSuper override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/bindables/src/main/java/com/skydoves/bindables/BindingFragment.kt b/bindables/src/main/java/com/skydoves/bindables/BindingFragment.kt index aa8cc78..f3c75a4 100644 --- a/bindables/src/main/java/com/skydoves/bindables/BindingFragment.kt +++ b/bindables/src/main/java/com/skydoves/bindables/BindingFragment.kt @@ -20,6 +20,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.annotation.CallSuper import androidx.annotation.LayoutRes import androidx.databinding.DataBindingComponent import androidx.databinding.DataBindingUtil @@ -70,6 +71,7 @@ abstract class BindingFragment constructor( /** * Ensures the [binding] property should be executed and provide the inflated view which depends on [contentLayoutId]. */ + @CallSuper override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?,