use of org.apache.commons.lang3.StringUtils.join in project Awful.apk by Awful.
the class SettingsActivity method onCreateDialog.
@Override
protected Dialog onCreateDialog(int dialogId) {
switch(dialogId) {
case DIALOG_ABOUT:
CharSequence app_version = getText(R.string.app_name);
try {
app_version = app_version + " " + getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
} catch (PackageManager.NameNotFoundException e) {
// rather unlikely, just show app_name without version
}
// Build the text for the About dialog
Resources res = getResources();
String aboutText = getString(R.string.about_contributors_title) + "\n\n";
aboutText += StringUtils.join(res.getStringArray(R.array.about_contributors_array), '\n');
aboutText += "\n\n" + getString(R.string.about_libraries_title) + "\n\n";
aboutText += StringUtils.join(res.getStringArray(R.array.about_libraries_array), '\n');
return new AlertDialog.Builder(this).setTitle(app_version).setMessage(aboutText).setNeutralButton(android.R.string.ok, (dialog, which) -> {
}).create();
default:
return super.onCreateDialog(dialogId);
}
}
Aggregations