use of com.mxt.anitrend.adapter.recycler.index.MediaAdapter 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);
}
mColumnSize = R.integer.grid_giphy_x3;
isPager = true;
mAdapter = new MediaAdapter(getContext(), true);
setPresenter(new BasePresenter(getContext()));
setViewModel(true);
}
use of com.mxt.anitrend.adapter.recycler.index.MediaAdapter 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;
}
}
}
use of com.mxt.anitrend.adapter.recycler.index.MediaAdapter 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);
}
use of com.mxt.anitrend.adapter.recycler.index.MediaAdapter in project anitrend-app by AniTrend.
the class MediaFavouriteFragment method onCreate.
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
userId = getArguments().getLong(KeyUtil.arg_id);
mediaType = getArguments().getString(KeyUtil.arg_mediaType);
}
mAdapter = new MediaAdapter(getContext(), true);
setPresenter(new BasePresenter(getContext()));
mColumnSize = R.integer.grid_giphy_x3;
isPager = true;
setViewModel(true);
}
Aggregations