@@ -0,0 +1,2742 @@
+package io.reist.visum.view;%0A%0Aimport android.accounts.AccountAuthenticatorActivity;%0Aimport android.os.Bundle;%0Aimport android.os.PersistableBundle;%0Aimport android.support.annotation.LayoutRes;%0A%0Aimport butterknife.ButterKnife;%0Aimport io.reist.visum.ComponentCache;%0Aimport io.reist.visum.ComponentCacheProvider;%0Aimport io.reist.visum.presenter.VisumPresenter;%0A%0A/**%0A * Created by defuera on 01/02/2016.%0A */%0Apublic abstract class VisumAccountAuthenticatorActivity%3CP extends VisumPresenter%3E extends AccountAuthenticatorActivity implements VisumView%3CP%3E %7B //cur move to visum?%0A%0A    private static final String ARG_STATE_COMPONENT_ID = %22ARG_STATE_COMPONENT_ID%22;%0A%0A    private Long componentId;%0A    private boolean stateSaved;%0A%0A    @SuppressWarnings(%22unchecked%22)%0A    @Override%0A    public void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A%0A        inject(getComponent());%0A%0A        setContentView(getLayoutRes());%0A        ButterKnife.bind(this);%0A%0A        final P presenter = getPresenter();%0A        if (presenter != null) %7B%0A            presenter.setView(this);%0A        %7D%0A%0A        ready();%0A    %7D%0A%0A    @LayoutRes%0A    protected abstract int getLayoutRes();%0A%0A    @SuppressWarnings(%22unchecked%22)%0A    @Override%0A    protected void onDestroy() %7B%0A        super.onDestroy();%0A%0A        if (!stateSaved) %7B%0A            getComponentCache().invalidateComponentFor(this);%0A        %7D%0A        if (getPresenter() != null)%0A            getPresenter().setView(null);%0A    %7D%0A%0A    private ComponentCache getComponentCache() %7B%0A        ComponentCacheProvider application = (ComponentCacheProvider) getApplicationContext();%0A        return application.getComponentCache();%0A    %7D%0A%0A    //region VisumView%0A%0A    @Override%0A    public Long getComponentId() %7B%0A        return componentId;%0A    %7D%0A%0A    @Override%0A    public void setComponentId(Long componentId) %7B%0A        this.componentId = componentId;%0A    %7D%0A%0A    @Override%0A    public Object getComponent() %7B%0A        if (getComponentCache() != null) %7B%0A            return getComponentCache().getComponentFor(this);%0A        %7D else %7B%0A            return null;%0A        %7D%0A    %7D%0A%0A    //endregion%0A%0A%0A    @Override%0A    public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) %7B%0A        super.onSaveInstanceState(outState, outPersistentState);%0A%0A        stateSaved = true;%0A%0A        Bundle bundle = new Bundle();%0A        bundle.putLong(ARG_STATE_COMPONENT_ID, componentId);%0A    %7D%0A%0A%0A    @Override%0A    protected void onRestoreInstanceState(Bundle savedInstanceState) %7B%0A        super.onRestoreInstanceState(savedInstanceState);%0A%0A        if (savedInstanceState != null) %7B%0A            componentId = savedInstanceState.getLong(ARG_STATE_COMPONENT_ID);%0A        %7D%0A%0A        stateSaved = false;%0A    %7D%0A%7D%0A

Create VisumAuthenticatorAtivity