diff --git a/CHANGELOG.md b/CHANGELOG.md
index 872ce3a0f..65aa93215 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,7 +46,7 @@ Version 3.x will be available with a [pro license](http://www.xprivacy.eu/) only
**Next release**
* Improved settings layout ([pull request](/../../issues/1946))
-* Show function help in a dialog ([pull request](/../../issues/1947))
+* Improved function help layout ([pull request](/../../issues/1947))
[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)
diff --git a/res/layout/help.xml b/res/layout/help.xml
index 73b3e78b8..836e1bd0b 100644
--- a/res/layout/help.xml
+++ b/res/layout/help.xml
@@ -1,5 +1,6 @@
+ android:layout_marginTop="6dip" />
+
+
+
+
\ No newline at end of file
diff --git a/src/biz/bokhorst/xprivacy/ActivityApp.java b/src/biz/bokhorst/xprivacy/ActivityApp.java
index 3ae2d9866..b58fd2295 100644
--- a/src/biz/bokhorst/xprivacy/ActivityApp.java
+++ b/src/biz/bokhorst/xprivacy/ActivityApp.java
@@ -1783,25 +1783,23 @@ public static void showHelp(ActivityBase context, View parent, Hook hook) {
dlgHelp.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, context.getThemed(R.attr.icon_launcher));
dlgHelp.setCancelable(true);
- // Set text title
+ // Set title
TextView tvTitle = (TextView) dlgHelp.findViewById(R.id.tvTitle);
tvTitle.setText(hook.getName());
- // Set text content
- String text = hook.getAnnotation();
- String[] permissions = hook.getPermissions();
- if (permissions != null && permissions.length > 0) {
- text += "
" + context.getString(R.string.title_permissions) + "
";
- if (permissions[0].equals(""))
- text += "-";
- else
- text += TextUtils.join("
", permissions);
- }
-
+ // Set info
TextView tvInfo = (TextView) dlgHelp.findViewById(R.id.tvInfo);
- tvInfo.setText(Html.fromHtml(text));
+ tvInfo.setText(Html.fromHtml(hook.getAnnotation()));
tvInfo.setMovementMethod(LinkMovementMethod.getInstance());
+ // Set permissions
+ String[] permissions = hook.getPermissions();
+ if (permissions != null && permissions.length > 0)
+ if (!permissions[0].equals("")) {
+ TextView tvPermissions = (TextView) dlgHelp.findViewById(R.id.tvPermissions);
+ tvPermissions.setText(Html.fromHtml(TextUtils.join("
", permissions)));
+ }
+
dlgHelp.show();
}
}