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' testImplementation 'org.robolectric:shadows-multidex:4.2'
} }
def canonicalVersionCode = 91 def canonicalVersionCode = 93
def canonicalVersionName = "1.5.1.6" def canonicalVersionName = "1.5.2"
def postFixSize = 10 def postFixSize = 10
def abiPostFix = ['armeabi-v7a' : 1, def abiPostFix = ['armeabi-v7a' : 1,

View File

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

View File

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