// Path: sample/src/main/java/com/tresorit/zerokitsdk/ZerokitApplication.java
// public class ZerokitApplication extends Application {
// 
//     private ApplicationComponent component;
// 
//     public static ZerokitApplication get(Context context) {
//         return (ZerokitApplication) context.getApplicationContext();
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         component = DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this))
//                 .adminApiModule(new AdminApiModule(BuildConfig.APP_BACKEND, BuildConfig.CLIENT_ID))
//                 .build();
//     }
// 
//     public ApplicationComponent component() {
//         return component;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/cache/ComponentControllerActivity.java
// public abstract class ComponentControllerActivity<C> extends ComponentCacheActivity {
// 
//     private final ComponentControllerDelegate<C> componentDelegate = new ComponentControllerDelegate<>();
// 
//     @Override
//     @CallSuper
//     public void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         ComponentCache componentCache = this;
//         componentDelegate.onCreate(componentCache, savedInstanceState, componentFactory);
//     }
// 
//     @Override
//     @CallSuper
//     public void onResume() {
//         super.onResume();
//         componentDelegate.onResume();
//     }
// 
//     @Override
//     @CallSuper
//     public void onSaveInstanceState(Bundle outState) {
//         super.onSaveInstanceState(outState);
//         componentDelegate.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     @CallSuper
//     public void onDestroy() {
//         super.onDestroy();
//         componentDelegate.onDestroy();
//     }
// 
// 
//     protected C getComponent() {
//         return componentDelegate.getComponent();
//     }
// 
//     protected abstract C onCreateNonConfigurationComponent();
// 
//     private final ComponentFactory<C> componentFactory = new ComponentFactory<C>() {
//         @NonNull
//         @Override
//         public C createComponent() {
//             return onCreateNonConfigurationComponent();
//         }
//     };
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/component/SignInComponent.java
// @ActivityScope
// @Component(
//         modules = {
//                 SignInModule.class
//         },
//         dependencies = {
//                 ApplicationComponent.class
//         }
// )
// public interface SignInComponent {
//     void inject(SignInActivity activity);
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/message/LoginFinisedMessage.java
// public class LoginFinisedMessage {
// 
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/message/ShowMessageMessage.java
// public class ShowMessageMessage {
// 
//     private final String message;
// 
//     public ShowMessageMessage(String message) {
//         this.message = message;
//     }
// 
//     public String getMessage() {
//         return message;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/viewmodel/SignInViewModel.java
// public class SignInViewModel extends BaseObservable {
// 
//     @SuppressWarnings("WeakerAccess")
//     public final BottomNavigationView.OnNavigationItemSelectedListener onNavigationItemSelectedListener;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableInt displayedChild;
// 
//     @Inject
//     public SignInViewModel(@SuppressWarnings("UnusedParameters") EventBus eventBus) {
//         displayedChild = new ObservableInt(0);
//         onNavigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() {
//             @Override
//             public boolean onNavigationItemSelected(@NonNull MenuItem item) {
//                 displayedChild.set(item.getItemId() == R.id.tab_signin ? 0 : 1);
//                 return true;
//             }
//         };
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/util/Util.java
// public static float dpToPx(Context context, float valueInDp) {
//     DisplayMetrics metrics = context.getResources().getDisplayMetrics();
//     return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, valueInDp, metrics);
// }


import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.view.ViewTreeObserver;
import com.tresorit.zerokitsdk.R;
import com.tresorit.zerokitsdk.ZerokitApplication;
import com.tresorit.zerokitsdk.cache.ComponentControllerActivity;
import com.tresorit.zerokitsdk.component.DaggerSignInComponent;
import com.tresorit.zerokitsdk.component.SignInComponent;
import com.tresorit.zerokitsdk.databinding.ActivitySigninBinding;
import com.tresorit.zerokitsdk.message.LoginFinisedMessage;
import com.tresorit.zerokitsdk.message.ShowMessageMessage;
import com.tresorit.zerokitsdk.viewmodel.SignInViewModel;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import javax.inject.Inject;
import static com.tresorit.zerokitsdk.util.Util.dpToPx;
package com.tresorit.zerokitsdk.activity;






public class SignInActivity extends ComponentControllerActivity<SignInComponent> {

    private static final int REQ_DEFAULT = 0;

    @SuppressWarnings({"WeakerAccess", "CanBeFinal"})
    @Inject
    SignInViewModel viewModel;

    @SuppressWarnings({"WeakerAccess", "CanBeFinal"})
    @Inject
    EventBus eventBus;

    @SuppressWarnings("WeakerAccess")
    ActivitySigninBinding binding;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getComponent().inject(this);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_signin);
        binding.setViewmodel(viewModel);
        binding.container.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
// Path: sample/src/main/java/com/tresorit/zerokitsdk/ZerokitApplication.java
// public class ZerokitApplication extends Application {
// 
//     private ApplicationComponent component;
// 
//     public static ZerokitApplication get(Context context) {
//         return (ZerokitApplication) context.getApplicationContext();
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         component = DaggerApplicationComponent.builder()
//                 .applicationModule(new ApplicationModule(this))
//                 .adminApiModule(new AdminApiModule(BuildConfig.APP_BACKEND, BuildConfig.CLIENT_ID))
//                 .build();
//     }
// 
//     public ApplicationComponent component() {
//         return component;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/cache/ComponentControllerActivity.java
// public abstract class ComponentControllerActivity<C> extends ComponentCacheActivity {
// 
//     private final ComponentControllerDelegate<C> componentDelegate = new ComponentControllerDelegate<>();
// 
//     @Override
//     @CallSuper
//     public void onCreate(@Nullable Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         ComponentCache componentCache = this;
//         componentDelegate.onCreate(componentCache, savedInstanceState, componentFactory);
//     }
// 
//     @Override
//     @CallSuper
//     public void onResume() {
//         super.onResume();
//         componentDelegate.onResume();
//     }
// 
//     @Override
//     @CallSuper
//     public void onSaveInstanceState(Bundle outState) {
//         super.onSaveInstanceState(outState);
//         componentDelegate.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     @CallSuper
//     public void onDestroy() {
//         super.onDestroy();
//         componentDelegate.onDestroy();
//     }
// 
// 
//     protected C getComponent() {
//         return componentDelegate.getComponent();
//     }
// 
//     protected abstract C onCreateNonConfigurationComponent();
// 
//     private final ComponentFactory<C> componentFactory = new ComponentFactory<C>() {
//         @NonNull
//         @Override
//         public C createComponent() {
//             return onCreateNonConfigurationComponent();
//         }
//     };
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/component/SignInComponent.java
// @ActivityScope
// @Component(
//         modules = {
//                 SignInModule.class
//         },
//         dependencies = {
//                 ApplicationComponent.class
//         }
// )
// public interface SignInComponent {
//     void inject(SignInActivity activity);
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/message/LoginFinisedMessage.java
// public class LoginFinisedMessage {
// 
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/message/ShowMessageMessage.java
// public class ShowMessageMessage {
// 
//     private final String message;
// 
//     public ShowMessageMessage(String message) {
//         this.message = message;
//     }
// 
//     public String getMessage() {
//         return message;
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/viewmodel/SignInViewModel.java
// public class SignInViewModel extends BaseObservable {
// 
//     @SuppressWarnings("WeakerAccess")
//     public final BottomNavigationView.OnNavigationItemSelectedListener onNavigationItemSelectedListener;
//     @SuppressWarnings("WeakerAccess")
//     public final ObservableInt displayedChild;
// 
//     @Inject
//     public SignInViewModel(@SuppressWarnings("UnusedParameters") EventBus eventBus) {
//         displayedChild = new ObservableInt(0);
//         onNavigationItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() {
//             @Override
//             public boolean onNavigationItemSelected(@NonNull MenuItem item) {
//                 displayedChild.set(item.getItemId() == R.id.tab_signin ? 0 : 1);
//                 return true;
//             }
//         };
//     }
// }
// 
// Path: sample/src/main/java/com/tresorit/zerokitsdk/util/Util.java
// public static float dpToPx(Context context, float valueInDp) {
//     DisplayMetrics metrics = context.getResources().getDisplayMetrics();
//     return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, valueInDp, metrics);
// }


// Path: sample/src/main/java/com/tresorit/zerokitsdk/activity/SignInActivity.java
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.view.ViewTreeObserver;
import com.tresorit.zerokitsdk.R;
import com.tresorit.zerokitsdk.ZerokitApplication;
import com.tresorit.zerokitsdk.cache.ComponentControllerActivity;
import com.tresorit.zerokitsdk.component.DaggerSignInComponent;
import com.tresorit.zerokitsdk.component.SignInComponent;
import com.tresorit.zerokitsdk.databinding.ActivitySigninBinding;
import com.tresorit.zerokitsdk.message.LoginFinisedMessage;
import com.tresorit.zerokitsdk.message.ShowMessageMessage;
import com.tresorit.zerokitsdk.viewmodel.SignInViewModel;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import javax.inject.Inject;
import static com.tresorit.zerokitsdk.util.Util.dpToPx;

package com.tresorit.zerokitsdk.activity;






public class SignInActivity extends ComponentControllerActivity<SignInComponent> {

    private static final int REQ_DEFAULT = 0;

    @SuppressWarnings({"WeakerAccess", "CanBeFinal"})
    @Inject
    SignInViewModel viewModel;

    @SuppressWarnings({"WeakerAccess", "CanBeFinal"})
    @Inject
    EventBus eventBus;

    @SuppressWarnings("WeakerAccess")
    ActivitySigninBinding binding;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getComponent().inject(this);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_signin);
        binding.setViewmodel(viewModel);
        binding.container.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
            @Override
            public void onGlobalLayout() {
                binding.bottomBar.post(new Runnable() {