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

Commit

Permalink
Fixed some UI elements not working
Browse files Browse the repository at this point in the history
Closes #1321
  • Loading branch information
M66B committed Feb 12, 2014
1 parent 00cd3b4 commit 8c1e724
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Test and beta releases will have experimental functions enabled by default.

**Next release**

* Fixed some UI elements not working ([issue](/../../issues/1321))
* Added reboot reasons to reboot view
* Easier multiple select ([issue](/../../issues/1318))

Expand Down
16 changes: 8 additions & 8 deletions res/layout/mainlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@
</LinearLayout>

<ScrollView
android:id="@+id/svTutorialHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/llHeader"
android:layout_alignTop="@id/llHeader"
android:orientation="vertical" >
android:orientation="vertical"
android:visibility="gone" >

<RelativeLayout
android:id="@+id/rlTutorialHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:background="?background_tutorial"
android:visibility="gone" >
android:background="?background_tutorial" >

<LinearLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -199,18 +199,18 @@
android:scrollbarStyle="insideInset" />

<ScrollView
android:id="@+id/svTutorialDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/lvApp"
android:orientation="vertical" >
android:orientation="vertical"
android:visibility="gone" >

<RelativeLayout
android:id="@+id/rlTutorialDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:background="?background_tutorial"
android:visibility="gone" >
android:background="?background_tutorial" >

<TextView
android:id="@+id/tvTutorialDetails"
Expand Down
16 changes: 8 additions & 8 deletions res/layout/restrictionlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@
</LinearLayout>

<ScrollView
android:id="@+id/svTutorialHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/llHeader"
android:layout_alignTop="@id/llHeader"
android:orientation="vertical" >
android:orientation="vertical"
android:visibility="gone" >

<RelativeLayout
android:id="@+id/rlTutorialHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:background="?background_tutorial"
android:visibility="gone" >
android:background="?background_tutorial" >

<LinearLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -209,18 +209,18 @@
android:scrollbarStyle="insideInset" />

<ScrollView
android:id="@+id/svTutorialDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/elvRestriction"
android:orientation="vertical" >
android:orientation="vertical"
android:visibility="gone" >

<RelativeLayout
android:id="@+id/rlTutorialDetails"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:background="?background_tutorial"
android:visibility="gone" >
android:background="?background_tutorial" >

<TextView
android:id="@+id/tvTutorialDetails"
Expand Down
11 changes: 6 additions & 5 deletions src/biz/bokhorst/xprivacy/ActivityApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
Expand Down Expand Up @@ -229,14 +230,14 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {

// Tutorial
if (!PrivacyManager.getSettingBool(0, PrivacyManager.cSettingTutorialDetails, false, false)) {
((RelativeLayout) findViewById(R.id.rlTutorialHeader)).setVisibility(View.VISIBLE);
((RelativeLayout) findViewById(R.id.rlTutorialDetails)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialHeader)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialDetails)).setVisibility(View.VISIBLE);
}
View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View view) {
ViewParent parent = view.getParent();
while (!parent.getClass().equals(RelativeLayout.class))
while (!parent.getClass().equals(ScrollView.class))
parent = parent.getParent();
((View) parent).setVisibility(View.GONE);
PrivacyManager.setSetting(0, PrivacyManager.cSettingTutorialDetails, Boolean.TRUE.toString());
Expand Down Expand Up @@ -431,8 +432,8 @@ private void optionHelp() {
}

private void optionTutorial() {
((RelativeLayout) findViewById(R.id.rlTutorialHeader)).setVisibility(View.VISIBLE);
((RelativeLayout) findViewById(R.id.rlTutorialDetails)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialHeader)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialDetails)).setVisibility(View.VISIBLE);
PrivacyManager.setSetting(0, PrivacyManager.cSettingTutorialDetails, Boolean.FALSE.toString());
}

Expand Down
11 changes: 6 additions & 5 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import android.widget.ProgressBar;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
Expand Down Expand Up @@ -271,14 +272,14 @@ public void onClick(View view) {

// Tutorial
if (!PrivacyManager.getSettingBool(0, PrivacyManager.cSettingTutorialMain, false, false)) {
((RelativeLayout) findViewById(R.id.rlTutorialHeader)).setVisibility(View.VISIBLE);
((RelativeLayout) findViewById(R.id.rlTutorialDetails)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialHeader)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialDetails)).setVisibility(View.VISIBLE);
}
View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View view) {
ViewParent parent = view.getParent();
while (!parent.getClass().equals(RelativeLayout.class))
while (!parent.getClass().equals(ScrollView.class))
parent = parent.getParent();
((View) parent).setVisibility(View.GONE);
PrivacyManager.setSetting(0, PrivacyManager.cSettingTutorialMain, Boolean.TRUE.toString());
Expand Down Expand Up @@ -966,8 +967,8 @@ public void onClick(DialogInterface dialog, int which) {
}

private void optionTutorial() {
((RelativeLayout) findViewById(R.id.rlTutorialHeader)).setVisibility(View.VISIBLE);
((RelativeLayout) findViewById(R.id.rlTutorialDetails)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialHeader)).setVisibility(View.VISIBLE);
((ScrollView) findViewById(R.id.svTutorialDetails)).setVisibility(View.VISIBLE);
PrivacyManager.setSetting(0, PrivacyManager.cSettingTutorialMain, Boolean.FALSE.toString());
}

Expand Down

0 comments on commit 8c1e724

Please sign in to comment.