Пример #1
0
 public override void ClearState()
 {
     if (_type == MediaType.Anime)
     {
         _animeListFragmentInstance = null;
     }
     else if (_type == MediaType.Manga)
     {
         _mangaListFragmentInstance = null;
     }
 }
Пример #2
0
        public static MediaListFragment CreateMediaListFragment(int userId, MediaType type, MediaSort sort = null)
        {
            var frag   = new MediaListFragment();
            var bundle = new Bundle(6);

            bundle.PutString(MediaTypeKey, type.Value);
            bundle.PutInt(UserIdKey, userId);
            frag.Arguments = bundle;

            return(frag);
        }
Пример #3
0
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            var typeString = Arguments.GetString(MediaTypeKey);

            _type   = AniListEnum.GetEnum <MediaType>(typeString);
            _userId = Arguments.GetInt(UserIdKey);

            if (_type == MediaType.Anime)
            {
                _animeListFragmentInstance = this;
            }
            else if (_type == MediaType.Manga)
            {
                _mangaListFragmentInstance = this;
            }

            _filterTextHandler ??= new Handler(UpdateFilterText);
            _filterModel = new MediaListFilterModel();
        }