Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
import com.owncloud.android.ui.NextcloudWebViewClient;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.SettingsActivity;
import com.owncloud.android.ui.dialog.IndeterminateProgressDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
import com.owncloud.android.utils.DisplayUtils;
Expand Down Expand Up @@ -1014,16 +1013,7 @@ private void checkOcServer() {
* server.
*/
private void checkBasicAuthorization(@Nullable String webViewUsername, @Nullable String webViewPassword) {
// be gentle with the user
IndeterminateProgressDialog dialog = IndeterminateProgressDialog.newInstance(R.string.auth_trying_to_login,
true);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.add(dialog, WAIT_DIALOG_TAG);
ft.commitAllowingStateLoss();

// validate credentials accessing the root folder
OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(webViewUsername,
webViewPassword);
OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(webViewUsername, webViewPassword);
accessRootFolder(credentials);
}

Expand Down Expand Up @@ -1132,7 +1122,7 @@ private void initLoginInfoView() {
MaterialButton cancelButton = accountSetupWebviewBinding.loginFlowV2.cancelButton;
loginFlowLayout.setVisibility(View.VISIBLE);

// add margin bottom to prevent overlapping with system bars
// add bottom padding to prevent overlapping with system bars
ViewCompat.setOnApplyWindowInsetsListener(loginFlowLayout, (view, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
view.setPadding(
Expand All @@ -1142,6 +1132,8 @@ private void initLoginInfoView() {
systemBars.bottom);
return insets;
});
// the listener is attached after the initial insets dispatch, so request a fresh pass
ViewCompat.requestApplyInsets(loginFlowLayout);

cancelButton.setOnClickListener(v -> {
loginFlowExecutorService.shutdown();
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layout/account_setup_webview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@

<ProgressBar
android:id="@+id/login_webview_progress_bar"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
style="@style/Widget.Material3.CircularProgressIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true" />
android:indeterminate="true"
android:indeterminateTint="@color/login_text_color" />

</FrameLayout>
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@
<string name="media_play_pause_description">Play or pause button</string>
<string name="media_forward_description">Fast forward button</string>

<string name="auth_trying_to_login">Trying to log in…</string>
<string name="auth_no_net_conn_title">No network connection</string>
<string name="auth_nossl_plain_ok_title">Secure connection unavailable.</string>
<string name="auth_connection_established">Connection established</string>
Expand Down
Loading