Пример #1
0
 @Override
 public void onIcon(ApkConfig apkConfig) {
   Bundle bundle = new Bundle();
   bundle.putString(Key.ApkConfig, JsonHelper.json(apkConfig));
   LaunchArgument argument =
       LaunchHelper.createArgument(FileEntriesContext.class, getActivity(), bundle);
   launch(argument);
 }
Пример #2
0
 private void selectApplication() {
   LaunchArgument argument =
       LaunchHelper.createArgument(
           AppListContext.class,
           getActivity(),
           (resultCode, data) -> {
             if (resultCode == Activity.RESULT_OK) {
               String acs = data.getStringExtra(Key.ApkConfig);
               ApkConfig apkConfig = JsonHelper.json(acs, ApkConfig.class);
               homePresenter.updateApkConfig(apkConfig);
               // TODO : view
               getActivity()
                   .setTitle(String.format("%s %s", apkConfig.getName(), apkConfig.getType()));
             }
             return true;
           });
   launch(argument);
 }
Пример #3
0
 private void launchFragment(Class<? extends Fragment> clazz) {
   LaunchArgument argument = LaunchHelper.createArgument(clazz, getActivity());
   launch(argument);
 }