Search in sources :

Example 11 with BasePresenter

use of com.mxt.anitrend.presenter.base.BasePresenter in project anitrend-app by AniTrend.

the class BottomSheetGiphy method onCreate.

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    presenter = new BasePresenter(getContext());
    mColumnSize = getResources().getInteger(R.integer.grid_giphy_x3);
    isPager = true;
}
Also used : BasePresenter(com.mxt.anitrend.presenter.base.BasePresenter)

Example 12 with BasePresenter

use of com.mxt.anitrend.presenter.base.BasePresenter in project anitrend-app by AniTrend.

the class MediaListFragment method onCreate.

/**
 * Override and set presenter, mColumnSize, and fetch argument/s
 *
 * @param savedInstanceState
 */
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (getArguments() != null) {
        userName = getArguments().getString(KeyUtil.arg_userName);
        queryContainer = getArguments().getParcelable(KeyUtil.arg_graph_params);
    }
    mColumnSize = R.integer.grid_list_x2;
    isFilterable = true;
    isPager = true;
    setPresenter(new BasePresenter(getContext()));
    setViewModel(true);
}
Also used : BasePresenter(com.mxt.anitrend.presenter.base.BasePresenter)

Example 13 with BasePresenter

use of com.mxt.anitrend.presenter.base.BasePresenter in project anitrend-app by AniTrend.

the class CharacterSearchFragment method onCreate.

/**
 * Override and set presenter, mColumnSize, and fetch argument/s
 *
 * @param savedInstanceState
 */
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (getArguments() != null)
        searchQuery = getArguments().getString(KeyUtil.arg_search);
    setPresenter(new BasePresenter(getContext()));
    mColumnSize = R.integer.grid_giphy_x3;
    isPager = true;
    setViewModel(true);
}
Also used : BasePresenter(com.mxt.anitrend.presenter.base.BasePresenter)

Example 14 with BasePresenter

use of com.mxt.anitrend.presenter.base.BasePresenter in project anitrend-app by AniTrend.

the class MediaSearchFragment method onCreate.

/**
 * Override and set presenter, mColumnSize, and fetch argument/s
 *
 * @param savedInstanceState
 */
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (getArguments() != null) {
        searchQuery = getArguments().getString(KeyUtil.arg_search);
        mediaType = getArguments().getString(KeyUtil.arg_mediaType);
    }
    setPresenter(new BasePresenter(getContext()));
    mColumnSize = R.integer.grid_giphy_x3;
    isPager = true;
    setViewModel(true);
}
Also used : BasePresenter(com.mxt.anitrend.presenter.base.BasePresenter)

Example 15 with BasePresenter

use of com.mxt.anitrend.presenter.base.BasePresenter in project anitrend-app by AniTrend.

the class WebTokenRequest method invalidateInstance.

/**
 * Invalidate authentication state, defaulting to signed out state
 * and disable sync services
 */
public static void invalidateInstance(Context context) {
    CommonPresenter presenter = new BasePresenter(context);
    presenter.getApplicationPref().setAuthenticated(false);
    presenter.getDatabase().invalidateBoxStores();
    JobSchedulerUtil.cancelJob(context);
    WebFactory.invalidate();
    token = null;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1)
        ShortcutHelper.removeAllDynamicShortcuts(context);
    AnalyticsUtil.clearSession();
}
Also used : CommonPresenter(com.mxt.anitrend.base.custom.presenter.CommonPresenter) BasePresenter(com.mxt.anitrend.presenter.base.BasePresenter)

Aggregations

BasePresenter (com.mxt.anitrend.presenter.base.BasePresenter)39 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)1 CommonPresenter (com.mxt.anitrend.base.custom.presenter.CommonPresenter)1 BaseModel (com.mxt.anitrend.model.api.retro.anilist.BaseModel)1 UserModel (com.mxt.anitrend.model.api.retro.anilist.UserModel)1 Genre (com.mxt.anitrend.model.entity.anilist.Genre)1 ApplicationPref (com.mxt.anitrend.util.ApplicationPref)1 IOException (java.io.IOException)1 List (java.util.List)1