本文整理匯總了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);
}