// Path: library/src/main/java/eu/inloop/viewmodel/base/ViewModelBaseEmptyActivity.java
// public abstract class ViewModelBaseEmptyActivity extends AppCompatActivity implements IViewModelProvider {
// 
//     @Nullable
//     private ViewModelProvider mViewModelProvider;
// 
//     @CallSuper
//     @Override
//     protected void onCreate(@Nullable final Bundle savedInstanceState) {
//         //This code must be execute prior to super.onCreate()
//         mViewModelProvider = ViewModelProvider.newInstance(this);
//         super.onCreate(savedInstanceState);
//     }
// 
//     @Override
//     @Nullable
//     public Object onRetainCustomNonConfigurationInstance() {
//         return mViewModelProvider;
//     }
// 
//     @CallSuper
//     @Override
//     public void onStop() {
//         super.onStop();
//         if (isFinishing()) {
//             if (null == mViewModelProvider) {
//                 throw new IllegalStateException("ViewModelProvider for activity " + this + " was null."); //NON-NLS
//             }
//             mViewModelProvider.removeAllViewModels();
//         }
//     }
// 
//     @Nullable
//     @Override
//     public ViewModelProvider getViewModelProvider() {
//         return mViewModelProvider;
//     }
// }
// 
// Path: sample/src/main/java/eu/inloop/viewmodel/sample/fragment/SampleBindingFragment.java
// 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() {
//         return new ViewModelBindingConfig(R.layout.fragment_sample_binding, requireActivity());
//     }
// }


import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import butterknife.ButterKnife;
import eu.inloop.viewmodel.base.ViewModelBaseEmptyActivity;
import eu.inloop.viewmodel.sample.R;
import eu.inloop.viewmodel.sample.fragment.SampleBindingFragment;
package eu.inloop.viewmodel.sample.activity;



public class SampleBindingActivity extends ViewModelBaseEmptyActivity {

    public static Intent newIntent(Context context) {
        return new Intent(context, SampleBindingActivity.class);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);

        if (savedInstanceState == null) {
// Path: library/src/main/java/eu/inloop/viewmodel/base/ViewModelBaseEmptyActivity.java
// public abstract class ViewModelBaseEmptyActivity extends AppCompatActivity implements IViewModelProvider {
// 
//     @Nullable
//     private ViewModelProvider mViewModelProvider;
// 
//     @CallSuper
//     @Override
//     protected void onCreate(@Nullable final Bundle savedInstanceState) {
//         //This code must be execute prior to super.onCreate()
//         mViewModelProvider = ViewModelProvider.newInstance(this);
//         super.onCreate(savedInstanceState);
//     }
// 
//     @Override
//     @Nullable
//     public Object onRetainCustomNonConfigurationInstance() {
//         return mViewModelProvider;
//     }
// 
//     @CallSuper
//     @Override
//     public void onStop() {
//         super.onStop();
//         if (isFinishing()) {
//             if (null == mViewModelProvider) {
//                 throw new IllegalStateException("ViewModelProvider for activity " + this + " was null."); //NON-NLS
//             }
//             mViewModelProvider.removeAllViewModels();
//         }
//     }
// 
//     @Nullable
//     @Override
//     public ViewModelProvider getViewModelProvider() {
//         return mViewModelProvider;
//     }
// }
// 
// Path: sample/src/main/java/eu/inloop/viewmodel/sample/fragment/SampleBindingFragment.java
// 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() {
//         return new ViewModelBindingConfig(R.layout.fragment_sample_binding, requireActivity());
//     }
// }


// Path: sample/src/main/java/eu/inloop/viewmodel/sample/activity/SampleBindingActivity.java
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import butterknife.ButterKnife;
import eu.inloop.viewmodel.base.ViewModelBaseEmptyActivity;
import eu.inloop.viewmodel.sample.R;
import eu.inloop.viewmodel.sample.fragment.SampleBindingFragment;

package eu.inloop.viewmodel.sample.activity;



public class SampleBindingActivity extends ViewModelBaseEmptyActivity {

    public static Intent newIntent(Context context) {
        return new Intent(context, SampleBindingActivity.class);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);

        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction().replace(R.id.root_content, new SampleBindingFragment(), "sample-binding-fragment").commit();