Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Showing appropriate main and details help
Browse files Browse the repository at this point in the history
Fixes #1921
  • Loading branch information
M66B committed Aug 31, 2014
1 parent aa94ae5 commit cffa4e4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ Version 3.x will be available with a [pro license](http://www.xprivacy.eu/) only

**Next release**

* Show application name above usage data ([issue](/../../issues/1949))
* Showing appropriate main and details help ([issue](/../../issues/1921))
* Showing application name above usage data ([issue](/../../issues/1949))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

Expand Down
17 changes: 13 additions & 4 deletions res/layout/legend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dip"
android:tag="details"
android:text="@string/help_switch"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="false" />
Expand All @@ -42,6 +43,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dip"
android:tag="main"
android:text="@string/help_longpress"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="false" />
Expand Down Expand Up @@ -165,6 +167,7 @@
android:drawableLeft="?attr/icon_info_book"
android:drawablePadding="6dip"
android:gravity="center_vertical"
android:tag="details"
android:text="@string/title_function_help"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="false" />
Expand All @@ -175,6 +178,7 @@
android:drawableLeft="?attr/icon_whitelist"
android:drawablePadding="6dip"
android:gravity="center_vertical"
android:tag="details"
android:text="@string/menu_whitelists"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="false" />
Expand All @@ -186,6 +190,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:tag="details"
android:visibility="gone" >

<LinearLayout
Expand Down Expand Up @@ -216,7 +221,8 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
android:orientation="horizontal"
android:tag="main" >

<LinearLayout
android:layout_width="48dip"
Expand Down Expand Up @@ -270,7 +276,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="2dip" >
android:paddingTop="2dip"
android:tag="main" >

<View
android:layout_width="12dip"
Expand All @@ -293,7 +300,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="2dip" >
android:paddingTop="2dip"
android:tag="main" >

<View
android:layout_width="12dip"
Expand All @@ -316,7 +324,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="2dip" >
android:paddingTop="2dip"
android:tag="main" >

<View
android:layout_width="12dip"
Expand Down
6 changes: 6 additions & 0 deletions src/biz/bokhorst/xprivacy/ActivityApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,16 @@ private void optionLegend() {
dialog.setTitle(R.string.menu_legend);
dialog.setContentView(R.layout.legend);
dialog.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, getThemed(R.attr.icon_launcher));

((ImageView) dialog.findViewById(R.id.imgHelpHalf)).setImageBitmap(getHalfCheckBox());
((ImageView) dialog.findViewById(R.id.imgHelpOnDemand)).setImageBitmap(getOnDemandCheckBox());

for (View child : Util.getViewsByTag((ViewGroup) dialog.findViewById(android.R.id.content), "main"))
child.setVisibility(View.GONE);

((LinearLayout) dialog.findViewById(R.id.llUnsafe)).setVisibility(PrivacyManager.cVersion3 ? View.VISIBLE
: View.GONE);

dialog.setCancelable(true);
dialog.show();
}
Expand Down
6 changes: 6 additions & 0 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,16 @@ private void optionLegend() {
dialog.setTitle(R.string.menu_legend);
dialog.setContentView(R.layout.legend);
dialog.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, getThemed(R.attr.icon_launcher));

((ImageView) dialog.findViewById(R.id.imgHelpHalf)).setImageBitmap(getHalfCheckBox());
((ImageView) dialog.findViewById(R.id.imgHelpOnDemand)).setImageBitmap(getOnDemandCheckBox());

for (View child : Util.getViewsByTag((ViewGroup) dialog.findViewById(android.R.id.content), "details"))
child.setVisibility(View.GONE);

((LinearLayout) dialog.findViewById(R.id.llUnsafe)).setVisibility(PrivacyManager.cVersion3 ? View.VISIBLE
: View.GONE);

dialog.setCancelable(true);
dialog.show();
}
Expand Down

0 comments on commit cffa4e4

Please sign in to comment.