// Path: library/src/main/java/eu/inloop/viewmodel/binding/ViewModelBaseBindingFragment.java
// public abstract class ViewModelBaseBindingFragment<T extends IView, R extends AbstractViewModel<T>, B extends ViewDataBinding>
//         extends ViewModelBaseFragment<T, R>
//         implements IView {
// 
//     @Override
//     public void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         getViewModelHelper().performBinding(this);
//     }
// 
//     @Nullable
//     @Override
//     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//         getViewModelHelper().performBinding(this);
//         final ViewDataBinding binding = getViewModelHelper().getBinding();
//         if (binding != null) {
//             return binding.getRoot();
//         } else {
//             throw new IllegalStateException("Binding cannot be null. Perform binding before calling getBinding()");
//         }
//     }
// 
//     @SuppressWarnings("unused")
//     @Nullable
//     public B getBinding() {
//         try {
//             return (B) getViewModelHelper().getBinding();
//         } catch (ClassCastException ex) {
//             throw new IllegalStateException("Method getViewModelBindingConfig() has to return same " +
//                     "ViewDataBinding type as it is set to base Fragment");
//         }
//     }
// }
// 
// Path: library/src/main/java/eu/inloop/viewmodel/binding/ViewModelBindingConfig.java
// public class ViewModelBindingConfig {
// 
//     @LayoutRes
//     private final int mLayoutResource;
//     private final int mViewModelVariableName;
//     @NonNull
//     private final Context mContext;
// 
//     /**
//      * Create a ViewModelBinding Config object for an Activity/Fragment
//      * This constructor should be used if the binding variable is named differently
//      *
//      * @param layoutResource        Layout resource ID
//      * @param viewModelVariableName Data Binding variable name for injecting the ViewModel - use
//      *                              generated id (e.g. BR.mViewModel)
//      */
//     public ViewModelBindingConfig(@LayoutRes int layoutResource, int viewModelVariableName, @NonNull Context context) {
//         mLayoutResource = layoutResource;
//         mViewModelVariableName = viewModelVariableName;
//         mContext = context;
//     }
// 
//     /**
//      * Create a ViewModelBinding Config object for an Activity/Fragment
//      * Use this constructor if the binding variable is named viewModel
//      *
//      * @param layoutResource Layout resource ID
//      */
//     public ViewModelBindingConfig(@LayoutRes int layoutResource, @NonNull Context context) {
//         this(layoutResource, BR.viewModel, context);
//     }
// 
//     @LayoutRes
//     public int getLayoutResource() {
//         return mLayoutResource;
//     }
// 
//     public int getViewModelVariableName() {
//         return mViewModelVariableName;
//     }
// 
//     @NonNull
//     public Context getContext() {
//         return mContext;
//     }
// }
// 
// Path: sample/src/main/java/eu/inloop/viewmodel/sample/viewmodel/SampleBindingViewModel.java
// public class SampleBindingViewModel extends AbstractViewModel<ISampleBindingView> {
// 
//     public final ObservableField<String> text = new ObservableField<>();
//     private int mButtonClickedCounter = 0;
// 
//     @Override
//     public void onCreate(@Nullable Bundle arguments, @Nullable Bundle savedInstanceState) {
//         super.onCreate(arguments, savedInstanceState);
//         setButtonClickedText();
//     }
// 
//     public void onButtonClick() {
//         mButtonClickedCounter++;
//         setButtonClickedText();
//     }
// 
//     private void setButtonClickedText() {
//         text.set("Button Clicked: " + mButtonClickedCounter + " times");
//     }
// }
// 
// Path: sample/src/main/java/eu/inloop/viewmodel/sample/viewmodel/view/ISampleBindingView.java
// public interface ISampleBindingView extends IView {
// }


import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
import androidx.fragment.app.Fragment;
import eu.inloop.viewmodel.binding.ViewModelBaseBindingFragment;
import eu.inloop.viewmodel.binding.ViewModelBindingConfig;
import eu.inloop.viewmodel.sample.R;
import eu.inloop.viewmodel.sample.databinding.FragmentSampleBindingBinding;
import eu.inloop.viewmodel.sample.viewmodel.SampleBindingViewModel;
import eu.inloop.viewmodel.sample.viewmodel.view.ISampleBindingView;
package eu.inloop.viewmodel.sample.fragment;



/**
 * A simple {@link Fragment} subclass.
 */
public class SampleBindingFragment
        extends ViewModelBaseBindingFragment<ISampleBindingView, SampleBindingViewModel, FragmentSampleBindingBinding>
        implements ISampleBindingView {

    public SampleBindingFragment() {
        // Required empty public constructor
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        setModelView(this);
    }

    @Override
// Path: library/src/main/java/eu/inloop/viewmodel/binding/ViewModelBaseBindingFragment.java
// public abstract class ViewModelBaseBindingFragment<T extends IView, R extends AbstractViewModel<T>, B extends ViewDataBinding>
//         extends ViewModelBaseFragment<T, R>
//         implements IView {
// 
//     @Override
//     public void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         getViewModelHelper().performBinding(this);
//     }
// 
//     @Nullable
//     @Override
//     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//         getViewModelHelper().performBinding(this);
//         final ViewDataBinding binding = getViewModelHelper().getBinding();
//         if (binding != null) {
//             return binding.getRoot();
//         } else {
//             throw new IllegalStateException("Binding cannot be null. Perform binding before calling getBinding()");
//         }
//     }
// 
//     @SuppressWarnings("unused")
//     @Nullable
//     public B getBinding() {
//         try {
//             return (B) getViewModelHelper().getBinding();
//         } catch (ClassCastException ex) {
//             throw new IllegalStateException("Method getViewModelBindingConfig() has to return same " +
//                     "ViewDataBinding type as it is set to base Fragment");
//         }
//     }
// }
// 
// Path: library/src/main/java/eu/inloop/viewmodel/binding/ViewModelBindingConfig.java
// public class ViewModelBindingConfig {
// 
//     @LayoutRes
//     private final int mLayoutResource;
//     private final int mViewModelVariableName;
//     @NonNull
//     private final Context mContext;
// 
//     /**
//      * Create a ViewModelBinding Config object for an Activity/Fragment
//      * This constructor should be used if the binding variable is named differently
//      *
//      * @param layoutResource        Layout resource ID
//      * @param viewModelVariableName Data Binding variable name for injecting the ViewModel - use
//      *                              generated id (e.g. BR.mViewModel)
//      */
//     public ViewModelBindingConfig(@LayoutRes int layoutResource, int viewModelVariableName, @NonNull Context context) {
//         mLayoutResource = layoutResource;
//         mViewModelVariableName = viewModelVariableName;
//         mContext = context;
//     }
// 
//     /**
//      * Create a ViewModelBinding Config object for an Activity/Fragment
//      * Use this constructor if the binding variable is named viewModel
//      *
//      * @param layoutResource Layout resource ID
//      */
//     public ViewModelBindingConfig(@LayoutRes int layoutResource, @NonNull Context context) {
//         this(layoutResource, BR.viewModel, context);
//     }
// 
//     @LayoutRes
//     public int getLayoutResource() {
//         return mLayoutResource;
//     }
// 
//     public int getViewModelVariableName() {
//         return mViewModelVariableName;
//     }
// 
//     @NonNull
//     public Context getContext() {
//         return mContext;
//     }
// }
// 
// Path: sample/src/main/java/eu/inloop/viewmodel/sample/viewmodel/SampleBindingViewModel.java
// public class SampleBindingViewModel extends AbstractViewModel<ISampleBindingView> {
// 
//     public final ObservableField<String> text = new ObservableField<>();
//     private int mButtonClickedCounter = 0;
// 
//     @Override
//     public void onCreate(@Nullable Bundle arguments, @Nullable Bundle savedInstanceState) {
//         super.onCreate(arguments, savedInstanceState);
//         setButtonClickedText();
//     }
// 
//     public void onButtonClick() {
//         mButtonClickedCounter++;
//         setButtonClickedText();
//     }
// 
//     private void setButtonClickedText() {
//         text.set("Button Clicked: " + mButtonClickedCounter + " times");
//     }
// }
// 
// Path: sample/src/main/java/eu/inloop/viewmodel/sample/viewmodel/view/ISampleBindingView.java
// public interface ISampleBindingView extends IView {
// }


// Path: sample/src/main/java/eu/inloop/viewmodel/sample/fragment/SampleBindingFragment.java
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
import androidx.fragment.app.Fragment;
import eu.inloop.viewmodel.binding.ViewModelBaseBindingFragment;
import eu.inloop.viewmodel.binding.ViewModelBindingConfig;
import eu.inloop.viewmodel.sample.R;
import eu.inloop.viewmodel.sample.databinding.FragmentSampleBindingBinding;
import eu.inloop.viewmodel.sample.viewmodel.SampleBindingViewModel;
import eu.inloop.viewmodel.sample.viewmodel.view.ISampleBindingView;

package eu.inloop.viewmodel.sample.fragment;



/**
 * A simple {@link Fragment} subclass.
 */
public class SampleBindingFragment
        extends ViewModelBaseBindingFragment<ISampleBindingView, SampleBindingViewModel, FragmentSampleBindingBinding>
        implements ISampleBindingView {

    public SampleBindingFragment() {
        // Required empty public constructor
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        setModelView(this);
    }

    @Override
    public ViewModelBindingConfig getViewModelBindingConfig() {