Create qr code login status view layout.
This commit is contained in:
parent
9b7f6c9003
commit
945fa0a390
|
@ -3333,6 +3333,8 @@
|
||||||
<!-- QR Code Login -->
|
<!-- QR Code Login -->
|
||||||
<string name="qr_code_login_header_scan_qr_code_title">Scan QR code</string>
|
<string name="qr_code_login_header_scan_qr_code_title">Scan QR code</string>
|
||||||
<string name="qr_code_login_header_scan_qr_code_description">Use the camera on this device to scan the QR code shown on your other device:</string>
|
<string name="qr_code_login_header_scan_qr_code_description">Use the camera on this device to scan the QR code shown on your other device:</string>
|
||||||
|
<string name="qr_code_login_header_connected_title">Secure connection established</string>
|
||||||
|
<string name="qr_code_login_header_connected_description">Check your signed in device, the code below should be displayed. Confirm that the code below matches with that device:</string>
|
||||||
<string name="qr_code_login_new_device_instruction_1">Open Element on your other device</string>
|
<string name="qr_code_login_new_device_instruction_1">Open Element on your other device</string>
|
||||||
<string name="qr_code_login_new_device_instruction_2">Go to Settings -> Security & Privacy</string>
|
<string name="qr_code_login_new_device_instruction_2">Go to Settings -> Security & Privacy</string>
|
||||||
<string name="qr_code_login_new_device_instruction_3">Select \'Link a device\'</string>
|
<string name="qr_code_login_new_device_instruction_3">Select \'Link a device\'</string>
|
||||||
|
@ -3340,5 +3342,8 @@
|
||||||
<string name="qr_code_login_show_qr_code_button">Show QR code in this device</string>
|
<string name="qr_code_login_show_qr_code_button">Show QR code in this device</string>
|
||||||
<string name="qr_code_login_need_an_alternative_method">Need an alternative method?</string>
|
<string name="qr_code_login_need_an_alternative_method">Need an alternative method?</string>
|
||||||
<string name="qr_code_login_scan_qr_code_button">Scan QR code</string>
|
<string name="qr_code_login_scan_qr_code_button">Scan QR code</string>
|
||||||
|
<string name="qr_code_login_connecting_to_device">Connecting to device</string>
|
||||||
|
<string name="qr_code_login_signing_in">Signing you in</string>
|
||||||
|
<string name="qr_code_login_status_no_match">No match?</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="54dp"
|
||||||
|
android:height="38dp"
|
||||||
|
android:viewportWidth="54"
|
||||||
|
android:viewportHeight="38">
|
||||||
|
<path
|
||||||
|
android:pathData="M53.667,19C53.667,17.533 52.467,16.333 51,16.333H45.48C44.173,7.293 36.413,0.333 27,0.333C17.587,0.333 9.827,7.293 8.52,16.333H3C1.533,16.333 0.333,17.533 0.333,19C0.333,20.467 1.533,21.667 3,21.667H8.52C9.827,30.707 17.587,37.667 27,37.667C36.413,37.667 44.173,30.707 45.48,21.667H51C52.467,21.667 53.667,20.467 53.667,19ZM35,25.667C35,27.133 33.8,28.333 32.333,28.333H21.667C20.2,28.333 19,27.133 19,25.667V17.667C19,16.2 20.2,15 21.667,15V12.333C21.667,9.107 24.547,6.52 27.907,7.08C30.52,7.507 32.333,9.96 32.333,12.627V15C33.8,15 35,16.2 35,17.667V25.667ZM29,21.667C29,22.76 28.093,23.667 27,23.667C25.907,23.667 25,22.76 25,21.667C25,20.573 25.907,19.667 27,19.667C28.093,19.667 29,20.573 29,21.667ZM29.667,12.333V15H24.333V12.333C24.333,10.867 25.533,9.667 27,9.667C28.467,9.667 29.667,10.867 29.667,12.333Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="40dp"
|
||||||
|
android:height="40dp"
|
||||||
|
android:viewportWidth="40"
|
||||||
|
android:viewportHeight="40">
|
||||||
|
<path
|
||||||
|
android:pathData="M20,40C31.046,40 40,31.046 40,20C40,8.954 31.046,0 20,0C8.954,0 0,8.954 0,20C0,31.046 8.954,40 20,40ZM18.084,14.688C18.007,13.809 18.655,13.037 19.535,12.976C20.399,12.914 21.17,13.562 21.263,14.441V14.688L20.769,20.86C20.723,21.431 20.244,21.863 19.674,21.863H19.581C19.041,21.816 18.624,21.4 18.578,20.86L18.084,14.688ZM21.015,24.887C21.015,25.637 20.407,26.244 19.657,26.244C18.907,26.244 18.3,25.637 18.3,24.887C18.3,24.137 18.907,23.529 19.657,23.529C20.407,23.529 21.015,24.137 21.015,24.887Z"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillType="evenOdd"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,96 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/qrCodeLoginStatusLoadingLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="100dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qrCodeLoginStatusLoadingTextView"
|
||||||
|
style="@style/TextAppearance.Vector.Subtitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:text="@string/qr_code_login_connecting_to_device" />
|
||||||
|
|
||||||
|
<include layout="@layout/item_loading" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<im.vector.app.features.login.qr.QrCodeLoginHeaderView
|
||||||
|
android:id="@+id/qrCodeLoginStatusHeaderView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:qrCodeLoginHeaderDescription="@string/qr_code_login_header_connected_description"
|
||||||
|
app:qrCodeLoginHeaderImageBackgroundTint="?colorPrimary"
|
||||||
|
app:qrCodeLoginHeaderImageResource="@drawable/ic_qr_code_login_connected"
|
||||||
|
app:qrCodeLoginHeaderTitle="@string/qr_code_login_header_connected_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qrCodeLoginStatusSecurityCode"
|
||||||
|
style="@style/TextAppearance.Vector.Title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="80dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/qrCodeLoginStatusHeaderView"
|
||||||
|
tools:text="28E-1B9-D0F-896"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/qrCodeLoginStatusAlternativeLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/qrCodeLoginStatusCancelButton"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:background="@drawable/divider_horizontal" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qrCodeLoginStatusNoMatchTextView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="?android:colorBackground"
|
||||||
|
android:paddingHorizontal="12dp"
|
||||||
|
android:text="@string/qr_code_login_status_no_match"
|
||||||
|
app:drawableLeftCompat="@drawable/divider_horizontal"
|
||||||
|
app:drawableTint="@color/alert_default_error_background" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/qrCodeLoginStatusCancelButton"
|
||||||
|
style="@style/Widget.Vector.Button.Outlined.Login"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
android:text="@string/action_cancel"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue