Merge branch 'dev' into ui

This commit is contained in:
nielsandriesse 2020-09-08 16:47:38 +10:00
commit 3f03d5637d
3 changed files with 57 additions and 57 deletions

View File

@ -181,8 +181,8 @@ dependencies {
testImplementation 'org.robolectric:shadows-multidex:4.2'
}
def canonicalVersionCode = 91
def canonicalVersionName = "1.5.1.6"
def canonicalVersionCode = 93
def canonicalVersionName = "1.5.2"
def postFixSize = 10
def abiPostFix = ['armeabi-v7a' : 1,

View File

@ -90,53 +90,53 @@
android:paddingStart="10dp"
android:paddingEnd="40dp"/>
<org.thoughtcrime.securesms.components.AnimatingToggle
android:id="@+id/button_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/passphrase_edit"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:gravity="center">
<!-- <org.thoughtcrime.securesms.components.AnimatingToggle-->
<!-- android:id="@+id/button_toggle"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignRight="@+id/passphrase_edit"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_gravity="center"-->
<!-- android:gravity="center">-->
<ImageButton android:id="@+id/passphrase_visibility"
android:src="?ic_visibility"
android:background="@drawable/touch_highlight_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:layout_centerVertical="true" />
<!-- <ImageButton android:id="@+id/passphrase_visibility"-->
<!-- android:src="?ic_visibility"-->
<!-- android:background="@drawable/touch_highlight_background"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:paddingStart="8dp"-->
<!-- android:paddingEnd="8dp"-->
<!-- android:paddingTop="3dp"-->
<!-- android:paddingBottom="3dp"-->
<!-- android:layout_centerVertical="true" />-->
<ImageButton android:id="@+id/passphrase_visibility_off"
android:src="?ic_visibility_off"
android:background="@drawable/touch_highlight_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:layout_centerVertical="true" />
<!-- <ImageButton android:id="@+id/passphrase_visibility_off"-->
<!-- android:src="?ic_visibility_off"-->
<!-- android:background="@drawable/touch_highlight_background"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:paddingStart="8dp"-->
<!-- android:paddingEnd="8dp"-->
<!-- android:paddingTop="3dp"-->
<!-- android:paddingBottom="3dp"-->
<!-- android:layout_centerVertical="true" />-->
</org.thoughtcrime.securesms.components.AnimatingToggle>
<!-- </org.thoughtcrime.securesms.components.AnimatingToggle>-->
<ImageButton android:id="@+id/ok_button"
android:src="?ic_arrow_forward"
android:contentDescription="@string/PassphrasePromptActivity_ok_button_content_description"
android:background="@null"
android:text="@string/prompt_passphrase_activity__unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingStart="5dp"
android:paddingTop="5dp"
android:paddingEnd="10dp"
android:paddingBottom="5dp"/>
<!-- <ImageButton android:id="@+id/ok_button"-->
<!-- android:src="?ic_arrow_forward"-->
<!-- android:contentDescription="@string/PassphrasePromptActivity_ok_button_content_description"-->
<!-- android:background="@null"-->
<!-- android:text="@string/prompt_passphrase_activity__unlock"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentEnd="true"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:textAppearance="?android:attr/textAppearanceMedium"-->
<!-- android:paddingStart="5dp"-->
<!-- android:paddingTop="5dp"-->
<!-- android:paddingEnd="10dp"-->
<!-- android:paddingBottom="5dp"/>-->
</RelativeLayout>
</LinearLayout>

View File

@ -76,8 +76,8 @@ public class PassphrasePromptActivity extends PassphraseActivity {
private Button lockScreenButton;
private EditText passphraseText;
private ImageButton showButton;
private ImageButton hideButton;
// private ImageButton showButton;
// private ImageButton hideButton;
private AnimatingToggle visibilityToggle;
private FingerprintManagerCompat fingerprintManager;
@ -203,11 +203,11 @@ public class PassphrasePromptActivity extends PassphraseActivity {
private void initializeResources() {
ImageButton okButton = findViewById(R.id.ok_button);
// ImageButton okButton = findViewById(R.id.ok_button);
Toolbar toolbar = findViewById(R.id.toolbar);
showButton = findViewById(R.id.passphrase_visibility);
hideButton = findViewById(R.id.passphrase_visibility_off);
// showButton = findViewById(R.id.passphrase_visibility);
// hideButton = findViewById(R.id.passphrase_visibility_off);
visibilityToggle = findViewById(R.id.button_toggle);
passphraseText = findViewById(R.id.passphrase_edit);
passphraseAuthContainer = findViewById(R.id.password_auth_container);
@ -217,17 +217,17 @@ public class PassphrasePromptActivity extends PassphraseActivity {
fingerprintCancellationSignal = new CancellationSignal();
fingerprintListener = new FingerprintListener();
setSupportActionBar(toolbar);
getSupportActionBar().setTitle("");
// setSupportActionBar(toolbar);
// getSupportActionBar().setTitle("");
SpannableString hint = new SpannableString(" " + getString(R.string.PassphrasePromptActivity_enter_passphrase));
hint.setSpan(new RelativeSizeSpan(0.9f), 0, hint.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
hint.setSpan(new TypefaceSpan("sans-serif"), 0, hint.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
passphraseText.setHint(hint);
okButton.setOnClickListener(new OkButtonClickListener());
showButton.setOnClickListener(new ShowButtonOnClickListener());
hideButton.setOnClickListener(new HideButtonOnClickListener());
// okButton.setOnClickListener(new OkButtonClickListener());
// showButton.setOnClickListener(new ShowButtonOnClickListener());
// hideButton.setOnClickListener(new HideButtonOnClickListener());
passphraseText.setOnEditorActionListener(new PassphraseActionListener());
passphraseText.setImeActionLabel(getString(R.string.prompt_passphrase_activity__unlock),
EditorInfo.IME_ACTION_DONE);
@ -316,7 +316,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
private class ShowButtonOnClickListener implements OnClickListener {
@Override
public void onClick(View v) {
visibilityToggle.display(hideButton);
// visibilityToggle.display(hideButton);
setPassphraseVisibility(true);
}
}
@ -324,7 +324,7 @@ public class PassphrasePromptActivity extends PassphraseActivity {
private class HideButtonOnClickListener implements OnClickListener {
@Override
public void onClick(View v) {
visibilityToggle.display(showButton);
// visibilityToggle.display(showButton);
setPassphraseVisibility(false);
}
}