mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
Align progress wheel with button.
This commit is contained in:
@@ -43,12 +43,12 @@
|
|||||||
style="?android:attr/progressBarStyleInverse"
|
style="?android:attr/progressBarStyleInverse"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/edit_password"
|
android:layout_alignTop="@id/btn_sign_in"
|
||||||
android:layout_marginTop="@dimen/margin_xlarge"
|
android:layout_alignBottom="@id/btn_sign_in"
|
||||||
android:visibility="gone" />
|
android:gravity="center"
|
||||||
|
android:visibility="invisible" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/forgot_password"
|
|
||||||
style="@style/BriarTextBody"
|
style="@style/BriarTextBody"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import java.util.concurrent.Executor;
|
|||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import static android.view.View.GONE;
|
import static android.view.View.INVISIBLE;
|
||||||
import static android.view.View.VISIBLE;
|
import static android.view.View.VISIBLE;
|
||||||
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
|
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ public class PasswordActivity extends BaseActivity {
|
|||||||
@Inject @CryptoExecutor private Executor cryptoExecutor;
|
@Inject @CryptoExecutor private Executor cryptoExecutor;
|
||||||
private Button signInButton;
|
private Button signInButton;
|
||||||
private ProgressBar progress;
|
private ProgressBar progress;
|
||||||
private TextView title, forgotPassword;
|
private TextView title;
|
||||||
private EditText password;
|
private EditText password;
|
||||||
|
|
||||||
private byte[] encrypted;
|
private byte[] encrypted;
|
||||||
@@ -57,7 +57,6 @@ public class PasswordActivity extends BaseActivity {
|
|||||||
signInButton = (Button) findViewById(R.id.btn_sign_in);
|
signInButton = (Button) findViewById(R.id.btn_sign_in);
|
||||||
progress = (ProgressBar) findViewById(R.id.progress_wheel);
|
progress = (ProgressBar) findViewById(R.id.progress_wheel);
|
||||||
title = (TextView) findViewById(R.id.title_password);
|
title = (TextView) findViewById(R.id.title_password);
|
||||||
forgotPassword = (TextView) findViewById(R.id.forgot_password);
|
|
||||||
password = (EditText) findViewById(R.id.edit_password);
|
password = (EditText) findViewById(R.id.edit_password);
|
||||||
password.setOnEditorActionListener(new OnEditorActionListener() {
|
password.setOnEditorActionListener(new OnEditorActionListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -100,8 +99,7 @@ public class PasswordActivity extends BaseActivity {
|
|||||||
private void validatePassword(final byte[] encrypted, Editable e) {
|
private void validatePassword(final byte[] encrypted, Editable e) {
|
||||||
hideSoftKeyboard();
|
hideSoftKeyboard();
|
||||||
// Replace the button with a progress bar
|
// Replace the button with a progress bar
|
||||||
signInButton.setVisibility(GONE);
|
signInButton.setVisibility(INVISIBLE);
|
||||||
forgotPassword.setVisibility(GONE);
|
|
||||||
progress.setVisibility(VISIBLE);
|
progress.setVisibility(VISIBLE);
|
||||||
// Decrypt the database key in a background thread
|
// Decrypt the database key in a background thread
|
||||||
final String password = e.toString();
|
final String password = e.toString();
|
||||||
@@ -123,8 +121,7 @@ public class PasswordActivity extends BaseActivity {
|
|||||||
public void run() {
|
public void run() {
|
||||||
title.setText(R.string.try_again);
|
title.setText(R.string.try_again);
|
||||||
signInButton.setVisibility(VISIBLE);
|
signInButton.setVisibility(VISIBLE);
|
||||||
forgotPassword.setVisibility(VISIBLE);
|
progress.setVisibility(INVISIBLE);
|
||||||
progress.setVisibility(GONE);
|
|
||||||
password.setText("");
|
password.setText("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user