コード例 #1
0
 @Override
 protected void onClick() {
   FileChooserUtil.runDirectoryChooser(
       (Activity) getContext(),
       myRequestCode,
       myResource.getResource("chooserTitle").getValue(),
       getStringValue(),
       myChooseWritableDirectoriesOnly);
 }
コード例 #2
0
  @Override
  protected void setValueFromIntent(Intent data) {
    final String value = FileChooserUtil.folderPathFromData(data);
    if (MiscUtil.isEmptyString(value)) {
      return;
    }

    final String currentValue = myOption.getValue();
    if (!currentValue.equals(value)) {
      myOption.setValue(value);
      setSummary(value);
    }

    if (myOnValueSetAction != null) {
      myOnValueSetAction.run();
    }
  }