Fix provider text visibility

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-16 21:17:23 +01:00
parent f1d89ccacb
commit 0123aa2cc1
2 changed files with 11 additions and 6 deletions

View file

@ -204,7 +204,9 @@ public class ServerSelectionController extends BaseController {
serverEntry.setEnabled(false); serverEntry.setEnabled(false);
progressBar.setVisibility(View.VISIBLE); progressBar.setVisibility(View.VISIBLE);
providersTextView.setVisibility(View.INVISIBLE); if (providersTextView.getVisibility() != View.GONE) {
providersTextView.setVisibility(View.INVISIBLE);
}
if (url.endsWith("/")) { if (url.endsWith("/")) {
url = url.substring(0, url.length() - 1); url = url.substring(0, url.length() - 1);
@ -228,7 +230,6 @@ public class ServerSelectionController extends BaseController {
String versionString = status.getVersion().substring(0, status.getVersion().indexOf(".")); String versionString = status.getVersion().substring(0, status.getVersion().indexOf("."));
int version = Integer.parseInt(versionString); int version = Integer.parseInt(versionString);
if (status.isInstalled() && !status.isMaintenance() && if (status.isInstalled() && !status.isMaintenance() &&
!status.isNeedsUpgrade() && !status.isNeedsUpgrade() &&
version >= 13) { version >= 13) {
@ -278,14 +279,18 @@ public class ServerSelectionController extends BaseController {
} }
progressBar.setVisibility(View.INVISIBLE); progressBar.setVisibility(View.INVISIBLE);
providersTextView.setVisibility(View.VISIBLE); if (providersTextView.getVisibility() != View.GONE) {
providersTextView.setVisibility(View.VISIBLE);
}
toggleProceedButton(false); toggleProceedButton(false);
dispose(); dispose();
} }
}, () -> { }, () -> {
progressBar.setVisibility(View.INVISIBLE); progressBar.setVisibility(View.INVISIBLE);
providersTextView.setVisibility(View.VISIBLE); if (providersTextView.getVisibility() != View.GONE) {
providersTextView.setVisibility(View.VISIBLE);
}
dispose(); dispose();
}); });
} }

View file

@ -32,14 +32,14 @@
android:layout_height="96dp" android:layout_height="96dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="36dp" android:layout_marginBottom="36dp"
android:layout_marginTop="108dp" android:layout_marginTop="92dp"
android:scaleType="fitXY" android:scaleType="fitXY"
app:srcCompat="@drawable/ic_logo"/> app:srcCompat="@drawable/ic_logo"/>
<studio.carbonylgroup.textfieldboxes.TextFieldBoxes <studio.carbonylgroup.textfieldboxes.TextFieldBoxes
android:id="@+id/text_field_boxes" android:id="@+id/text_field_boxes"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="104dp" android:layout_height="120dp"
android:layout_below="@id/image_logo" android:layout_below="@id/image_logo"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"