本文整理汇总了Java中android.content.Intent.getCharExtra方法的典型用法代码示例。如果您正苦于以下问题:Java Intent.getCharExtra方法的具体用法?Java Intent.getCharExtra怎么用?Java Intent.getCharExtra使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.content.Intent
的用法示例。
在下文中一共展示了Intent.getCharExtra方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fromIntent
import android.content.Intent; //导入方法依赖的package包/类
public static CsvImportOptions fromIntent(Intent data) {
WhereFilter filter = WhereFilter.fromIntent(data);
Currency currency = CurrencyExportPreferences.fromIntent(data, "csv");
char fieldSeparator = data.getCharExtra(CsvImportActivity.CSV_IMPORT_FIELD_SEPARATOR, ',');
String dateFormat = data.getStringExtra(CsvImportActivity.CSV_IMPORT_DATE_FORMAT);
long selectedAccountId = data.getLongExtra(CsvImportActivity.CSV_IMPORT_SELECTED_ACCOUNT_2, -1);
String filename = data.getStringExtra(CsvImportActivity.CSV_IMPORT_FILENAME);
boolean useHeaderFromFile = data.getBooleanExtra(CsvImportActivity.CSV_IMPORT_USE_HEADER_FROM_FILE, true);
return new CsvImportOptions(currency, dateFormat, selectedAccountId, filter, filename, fieldSeparator, useHeaderFromFile);
}
示例2: fromIntent
import android.content.Intent; //导入方法依赖的package包/类
public static CsvExportOptions fromIntent(Intent data) {
WhereFilter filter = WhereFilter.fromIntent(data);
Currency currency = CurrencyExportPreferences.fromIntent(data, "csv");
char fieldSeparator = data.getCharExtra(CsvExportActivity.CSV_EXPORT_FIELD_SEPARATOR, ',');
boolean includeHeader = data.getBooleanExtra(CsvExportActivity.CSV_EXPORT_INCLUDE_HEADER, true);
boolean exportSplits = data.getBooleanExtra(CsvExportActivity.CSV_EXPORT_SPLITS, false);
boolean uploadToDropbox = data.getBooleanExtra(CsvExportActivity.CSV_EXPORT_UPLOAD_TO_DROPBOX, false);
return new CsvExportOptions(currency, fieldSeparator, includeHeader, exportSplits, uploadToDropbox, filter, true);
}