本文整理汇总了Java中android.os.Environment.DIRECTORY_DOCUMENTS属性的典型用法代码示例。如果您正苦于以下问题:Java Environment.DIRECTORY_DOCUMENTS属性的具体用法?Java Environment.DIRECTORY_DOCUMENTS怎么用?Java Environment.DIRECTORY_DOCUMENTS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.os.Environment
的用法示例。
在下文中一共展示了Environment.DIRECTORY_DOCUMENTS属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePreferenceView
private void updatePreferenceView() {
String emailAddress = prefs.getString(EMAIL_ADDRESS_TO_SEND_TO, "");
CharSequence tempSummary;
if (emailAddress.isEmpty()) {
tempSummary = emailAddressPref.getSummary();
} else {
tempSummary = emailAddress;
}
getPreferenceScreen().removeAll();
addPreferencesFromResource(R.xml.preferences);
versionPref = findPreference(PREF_VERSION);
versionPref.setSummary(versionSummary);
Preference downloadFolderPref = findPreference(DOWNLOAD_FILE_PREFERENCE);
String defaultDownloadFolder = Environment.getExternalStorageDirectory()
+ "/" + Environment.DIRECTORY_DOCUMENTS;
downloadFolderPref.setSummary(defaultDownloadFolder);
emailAddressPref = findPreference(EMAIL_ADDRESS_TO_SEND_TO);
emailAddressPref.setSummary(tempSummary);
developerPref = findPreference(PREF_DEVELOPER);
privacyPolicyPref = findPreference(PREF_PRIVACY_POLICY);
initializePreferenceListener();
}