summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-07 19:54:46 +0100
committercyBerta <cyberta@riseup.net>2021-11-07 19:54:46 +0100
commit6ef5241baf6a1fa2bc4e6f3ecd805edf4827e712 (patch)
tree12d584701d4e0b86e2c37ec3ef2aa8bb963ec961 /app/src/main/java
parent840b2ca0dea22bba983698d832d3f4d1e7efacf8 (diff)
tweak loading screen - hide connection details behind a clickable lable
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java27
1 files changed, 22 insertions, 5 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java
index 12c237c5..546beb18 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ConfigWizardBaseActivity.java
@@ -71,7 +71,15 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity imple
@Nullable
@BindView(R.id.btn_connection_detail)
- protected Button connectionDetailBtn;
+ protected AppCompatTextView connectionDetailBtn;
+
+ @Nullable
+ @BindView(R.id.connection_detail_header_container)
+ protected RelativeLayout connectionDetailHeaderContainer;
+
+ @Nullable
+ @BindView(R.id.connection_details_title)
+ protected AppCompatTextView connectionDetailsTitle;
@Nullable
@BindView(R.id.connection_detail_container)
@@ -224,7 +232,7 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity imple
return;
}
- connectionDetailBtn.setVisibility(VISIBLE);
+ connectionDetailHeaderContainer.setVisibility(GONE);
connectionDetailContainer.setVisibility(GONE);
logsContainer.setVisibility(GONE);
}
@@ -254,10 +262,19 @@ public abstract class ConfigWizardBaseActivity extends ButterKnifeActivity imple
snowflakeState.setText(getLastSnowflakeLog());
torState.setText(getLastTorLog());
connectionDetailBtn.setOnClickListener(v -> {
- connectionDetailBtn.setVisibility(GONE);
- logsContainer.setVisibility(VISIBLE);
+ if (logsContainer.getVisibility() == VISIBLE) {
+ logsContainer.setVisibility(GONE);
+ connectionDetailContainer.setVisibility(GONE);
+ connectionDetailsTitle.setVisibility(GONE);
+ connectionDetailBtn.setText(R.string.show_connection_details);
+ } else {
+ logsContainer.setVisibility(VISIBLE);
+ connectionDetailContainer.setVisibility(VISIBLE);
+ connectionDetailsTitle.setVisibility(VISIBLE);
+ connectionDetailBtn.setText(R.string.hide_connection_details);
+ }
});
- connectionDetailContainer.setVisibility(VISIBLE);
+ connectionDetailHeaderContainer.setVisibility(VISIBLE);
}
private int getFirstVisibleItemPosion() {