class BaseRegisterActivity extends SecuredNativeSmartRegisterActivity implements BaseRegisterContract.View {

    public void switchToFragment(final int position) {
        Timber.v("we are here switchtofragragment");
        try {
            if (Looper.myLooper() == Looper.getMainLooper()) {
                mPager.setCurrentItem(position, false);
            } else {
                appExecutors.mainThread().execute(new Runnable() {
                    @Override
                    public void run() {
                        mPager.setCurrentItem(position, false);
                    }
                });
            }
        } catch (Exception e) {
            Timber.e(e);
        }
    }

}