Added QR code scanning.

This commit is contained in:
Mikunj
2019-11-22 12:08:09 +11:00
parent 27c8b45ae3
commit b650ee6ebc
8 changed files with 107 additions and 11 deletions

View File

@@ -96,6 +96,17 @@
app:labeledEditText_background="@color/loki_darkest_gray"
app:labeledEditText_label="@string/activity_key_pair_public_key_edit_text_label"/>
<Button
android:id="@+id/scanQRButton"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/transparent"
android:elevation="0dp"
android:stateListAnimator="@null"
android:text="@string/fragment_scan_qr_code_title"
android:textColor="@color/signal_primary"
android:visibility="gone" />
<Button
android:id="@+id/toggleRestoreModeButton"
android:layout_width="match_parent"
@@ -123,7 +134,7 @@
android:layout_height="50dp"
android:background="@color/transparent"
android:textColor="@color/signal_primary"
android:text="Link Device"
android:text="@string/activity_key_pair_toggle_mode_button_title_3"
android:elevation="0dp"
android:stateListAnimator="@null" />

View File

@@ -24,13 +24,14 @@
android:layout_height="match_parent"/>
<TextView
android:id="@+id/descriptionTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="32dp"
android:gravity="center"
android:background="@color/loki_darkest_gray"
android:text="@string/fragment_scan_qr_code_explanation"
android:text="@string/fragment_scan_qr_code_explanation_new_conversation"
android:textColor="?android:textColorPrimary" />
</LinearLayout>

View File

@@ -16,6 +16,13 @@
android:indeterminate="true"
android:progressTint="@color/white" />
<ImageView
android:id="@+id/qrCodeImageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/white" />
<TextView
android:id="@+id/titleTextView"
style="@style/Signal.Text.Headline"

View File

@@ -1638,7 +1638,8 @@
<string name="view_device_linking_cancel_button_title">Cancel</string>
<!-- Scan QR code fragment -->
<string name="fragment_scan_qr_code_title">Scan QR Code</string>
<string name="fragment_scan_qr_code_explanation">Scan the QR code of the person you\'d like to securely message. They can find their QR code by going into Loki Messenger\'s in-app settings and clicking \"Show QR Code\".</string>
<string name="fragment_scan_qr_code_explanation_new_conversation">Scan the QR code of the person you\'d like to securely message. They can find their QR code by going into Loki Messenger\'s in-app settings and clicking \"Show QR Code\".</string>
<string name="fragment_scan_qr_code_explanation_link_device">Scan the QR code of the device you would like to link.</string>
<string name="fragment_scan_qr_code_camera_permission_dialog_message">Loki Messenger needs camera access to scan QR codes.</string>
<!-- Conversation activity -->
<string name="activity_conversation_copy_public_key_button_title">Copy public key</string>