View difference between Paste ID: 6qmgiAra and gkt0AwjV
SHOW: | | - or go back to the newest paste.
1
@AutoValue
2
public abstract class MediaKey  extends BaseKey
3
{
4
    private MediaFragment mediaFragment;
5
6
    public static MediaKey create()
7
    {
8
        return new AutoValue_MediaKey();
9
    }
10
11
    @Override
12
    public BaseFragment createFragment()
13
    {
14
        if(mediaFragment == null)
15
        {
16
            mediaFragment = new MediaFragment();
17
        }
18
19
        return mediaFragment;
20
    }
21
}
22
23
24
MediaKey key = MediaKey.create();
25
26
Bundle bundle = new Bundle();
27
bundle.putInt(GeneralUtils.CLEAR_APP_MAIN_POS,position);
28
bundle.putInt(GeneralUtils.CLEAR_APP_SUB_POS,0);
29
MainModel mainModel = appModel.getSubCategories().get(0);
30
31
bundle.putParcelable(GeneralUtils.MEDIA_BOOSTER_SUBS_KEY,mainModel);
32
/* TODO send sub key */
33
key.createFragment().setArguments(bundle);
34
MainActivity.get(rootView.getContext()).navigateTo(key);