gpt4 book ai didi

com.koolearn.android.kooreader.preferences.ZLEnumPreference类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 12:19:09 28 4
gpt4 key购买 nike

本文整理了Java中com.koolearn.android.kooreader.preferences.ZLEnumPreference类的一些代码示例,展示了ZLEnumPreference类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLEnumPreference类的具体详情如下:
包路径:com.koolearn.android.kooreader.preferences.ZLEnumPreference
类名称:ZLEnumPreference

ZLEnumPreference介绍

暂无

代码示例

代码示例来源:origin: Jiangzqts/EpubRead

ZLEnumPreference(Context context, ZLEnumOption<T> option, ZLResource resource, ZLResource valuesResource) {
  super(context, resource, valuesResource);
  myOption = option;
  final T initialValue = option.getValue();
  final T[] allValues = initialValue.getDeclaringClass().getEnumConstants();
  final String[] stringValues = new String[allValues.length];
  for (int i = 0; i < stringValues.length; ++i) {
    stringValues[i] = allValues[i].toString();
  }
  setList(stringValues);
  setInitialValue(initialValue.toString());
}

代码示例来源:origin: ydcx/KooReader

public <T extends Enum<T>> Preference addOption(ZLEnumOption<T> option, String key) {
  return addPreference(
      new ZLEnumPreference<T>(ZLPreferenceActivity.this, option, Resource.getResource(key))
  );
}

代码示例来源:origin: Jiangzqts/EpubRead

@Override
  protected void onDialogClosed(boolean result) {
    super.onDialogClosed(result);
    myOption.setValue(Enum.valueOf(myOption.getValue().getDeclaringClass(), getValue()));
  }
}

代码示例来源:origin: Jiangzqts/EpubRead

public <T extends Enum<T>> Preference addOption(ZLEnumOption<T> option, String key) {
  return addPreference(
      new ZLEnumPreference<T>(ZLPreferenceActivity.this, option, Resource.getResource(key))
  );
}

代码示例来源:origin: ydcx/KooReader

@Override
  protected void onDialogClosed(boolean result) {
    super.onDialogClosed(result);
    myOption.setValue(Enum.valueOf(myOption.getValue().getDeclaringClass(), getValue()));
  }
}

代码示例来源:origin: ydcx/KooReader

ZLEnumPreference(Context context, ZLEnumOption<T> option, ZLResource resource, ZLResource valuesResource) {
  super(context, resource, valuesResource);
  myOption = option;
  final T initialValue = option.getValue();
  final T[] allValues = initialValue.getDeclaringClass().getEnumConstants();
  final String[] stringValues = new String[allValues.length];
  for (int i = 0; i < stringValues.length; ++i) {
    stringValues[i] = allValues[i].toString();
  }
  setList(stringValues);
  setInitialValue(initialValue.toString());
}

代码示例来源:origin: Jiangzqts/EpubRead

public <T extends Enum<T>> Preference addOption(ZLEnumOption<T> option, String key, String valuesKey) {
    return addPreference(
        new ZLEnumPreference<T>(ZLPreferenceActivity.this, option, Resource.getResource(key), Resource.getResource(valuesKey))
    );
  }
}

代码示例来源:origin: ydcx/KooReader

public <T extends Enum<T>> Preference addOption(ZLEnumOption<T> option, String key, String valuesKey) {
    return addPreference(
        new ZLEnumPreference<T>(ZLPreferenceActivity.this, option, Resource.getResource(key), Resource.getResource(valuesKey))
    );
  }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com