Use \t like in the description. Add \n when none.

This commit is contained in:
Daniel Martí 2013-05-03 23:00:25 +02:00
parent 308b776f43
commit bf3d3c6d69

View File

@ -443,7 +443,10 @@ public class AppDetails extends ListActivity {
tv = (TextView) infoView.findViewById(R.id.permissions_list); tv = (TextView) infoView.findViewById(R.id.permissions_list);
if (pref_permissions) { if (pref_permissions) {
CommaSeparatedList permsList = app.apks.get(0).detail_permissions; CommaSeparatedList permsList = app.apks.get(0).detail_permissions;
if (permsList == null) tv.setText(R.string.no_permissions); if (permsList == null) {
StringBuilder sb = new StringBuilder(R.string.no_permissions);
sb.append('\n')
tv.setText(sb.toString());
else { else {
Iterator<String> permissions = permsList.iterator(); Iterator<String> permissions = permsList.iterator();
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -451,7 +454,7 @@ public class AppDetails extends ListActivity {
String permissionName = permissions.next(); String permissionName = permissions.next();
try { try {
Permission permission = new Permission(this, permissionName); Permission permission = new Permission(this, permissionName);
sb.append(" " + permission.getName() + '\n'); sb.append("\t" + permission.getName() + '\n');
} catch (NameNotFoundException e) { } catch (NameNotFoundException e) {
Log.d( "FDroid", Log.d( "FDroid",
"Can't find permsission '" + permissionName + "'"); "Can't find permsission '" + permissionName + "'");