Search in sources :

Example 11 with MediaPresenter

use of com.mxt.anitrend.presenter.fragment.MediaPresenter in project anitrend-app by AniTrend.

the class MediaTrendListFragment 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)
        isCompatType = getArguments().getBoolean(KeyUtil.arg_media_compact);
    isPager = true;
    isFilterable = true;
    mColumnSize = R.integer.single_list_x1;
    setPresenter(new MediaPresenter(getContext()));
    setViewModel(true);
}
Also used : MediaPresenter(com.mxt.anitrend.presenter.fragment.MediaPresenter)

Example 12 with MediaPresenter

use of com.mxt.anitrend.presenter.fragment.MediaPresenter in project anitrend-app by AniTrend.

the class MediaRecommendationsFragment 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) {
        mediaId = getArguments().getLong(KeyUtil.arg_id);
        mediaType = getArguments().getString(KeyUtil.arg_mediaType);
    }
    mColumnSize = R.integer.grid_giphy_x3;
    mAdapter = new GroupSeriesAdapter(getContext());
    setPresenter(new MediaPresenter(getContext()));
    setViewModel(true);
}
Also used : GroupSeriesAdapter(com.mxt.anitrend.adapter.recycler.group.GroupSeriesAdapter) MediaPresenter(com.mxt.anitrend.presenter.fragment.MediaPresenter)

Example 13 with MediaPresenter

use of com.mxt.anitrend.presenter.fragment.MediaPresenter in project anitrend-app by AniTrend.

the class MediaRelationFragment 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) {
        mediaId = getArguments().getLong(KeyUtil.arg_id);
        mediaType = getArguments().getString(KeyUtil.arg_mediaType);
    }
    mColumnSize = R.integer.grid_giphy_x3;
    mAdapter = new GroupSeriesAdapter(getContext());
    setPresenter(new MediaPresenter(getContext()));
    setViewModel(true);
}
Also used : GroupSeriesAdapter(com.mxt.anitrend.adapter.recycler.group.GroupSeriesAdapter) MediaPresenter(com.mxt.anitrend.presenter.fragment.MediaPresenter)

Example 14 with MediaPresenter

use of com.mxt.anitrend.presenter.fragment.MediaPresenter in project anitrend-app by AniTrend.

the class MediaBrowseFragment 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) {
        queryContainer = getArguments().getParcelable(KeyUtil.arg_graph_params);
        mediaBrowseUtil = getArguments().getParcelable(KeyUtil.arg_media_util);
    }
    if (mediaBrowseUtil == null)
        mediaBrowseUtil = new MediaBrowseUtil(true);
    isPager = true;
    isFilterable = mediaBrowseUtil.isFilterEnabled();
    mAdapter = new MediaAdapter(getContext(), mediaBrowseUtil.isCompactType());
    setPresenter(new MediaPresenter(getContext()));
    setViewModel(true);
    if (mediaBrowseUtil.isCompactType()) {
        mColumnSize = R.integer.grid_giphy_x3;
    } else {
        if (getPresenter().getSettings().getMediaListStyle() == KeyUtil.LIST_VIEW_STYLE_COMPACT_X1) {
            mColumnSize = R.integer.single_list_x1;
        } else {
            mColumnSize = R.integer.grid_list_x2;
        }
    }
}
Also used : MediaBrowseUtil(com.mxt.anitrend.util.media.MediaBrowseUtil) MediaAdapter(com.mxt.anitrend.adapter.recycler.index.MediaAdapter) MediaPresenter(com.mxt.anitrend.presenter.fragment.MediaPresenter)

Example 15 with MediaPresenter

use of com.mxt.anitrend.presenter.fragment.MediaPresenter in project anitrend-app by AniTrend.

the class StudioMediaFragment method onCreate.

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (getArguments() != null)
        id = getArguments().getLong(KeyUtil.arg_id);
    mColumnSize = R.integer.grid_giphy_x3;
    isPager = true;
    isFilterable = true;
    mAdapter = new MediaAdapter(getContext(), true);
    setPresenter(new MediaPresenter(getContext()));
    setViewModel(true);
}
Also used : MediaAdapter(com.mxt.anitrend.adapter.recycler.index.MediaAdapter) MediaPresenter(com.mxt.anitrend.presenter.fragment.MediaPresenter)

Aggregations

MediaPresenter (com.mxt.anitrend.presenter.fragment.MediaPresenter)15 GroupSeriesAdapter (com.mxt.anitrend.adapter.recycler.group.GroupSeriesAdapter)4 MediaAdapter (com.mxt.anitrend.adapter.recycler.index.MediaAdapter)2 Intent (android.content.Intent)1 View (android.view.View)1 GroupActorAdapter (com.mxt.anitrend.adapter.recycler.group.GroupActorAdapter)1 GroupCharacterAdapter (com.mxt.anitrend.adapter.recycler.group.GroupCharacterAdapter)1 GroupCharacterStaffAdapter (com.mxt.anitrend.adapter.recycler.group.GroupCharacterStaffAdapter)1 GroupStaffRoleAdapter (com.mxt.anitrend.adapter.recycler.group.GroupStaffRoleAdapter)1 MediaListAdapter (com.mxt.anitrend.adapter.recycler.index.MediaListAdapter)1 MediaBase (com.mxt.anitrend.model.entity.base.MediaBase)1 RecyclerItem (com.mxt.anitrend.model.entity.group.RecyclerItem)1 MediaBrowseUtil (com.mxt.anitrend.util.media.MediaBrowseUtil)1 MediaActivity (com.mxt.anitrend.view.activity.detail.MediaActivity)1 QueryContainerBuilder (io.github.wax911.library.model.request.QueryContainerBuilder)1