Signal-Android/app/src/main/res/layout/verify_display_fragment.xml

281 wiersze
12 KiB
XML

<?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="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:fillViewport="true">
<org.thoughtcrime.securesms.util.views.DarkOverflowToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="56dp"
android:theme="?attr/settingsToolbarStyle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navigationIcon="@drawable/ic_arrow_left_24"
app:titleTextAppearance="@style/Signal.Text.Title"
app:navigationContentDescription="@string/DSLSettingsToolbar__navigate_up"
tools:title="@string/AndroidManifest__verify_safety_number" />
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:fillViewport="true"
app:layout_constraintTop_toBottomOf="@id/toolbar"
app:layout_constraintBottom_toTopOf="@id/verify_button_container">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/signal_background_primary"
android:gravity="center_horizontal"
android:orientation="vertical"
android:layout_marginStart="36dp"
android:layout_marginEnd="36dp">
<LinearLayout
android:id="@+id/qr_code_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/verify_identity_vertical_margin"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:background="@drawable/qr_code_background"
android:orientation="vertical">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="36dp">
<TextView
android:id="@+id/loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/verify_display_fragment__loading"
android:textSize="20sp" />
<org.thoughtcrime.securesms.components.SquareImageView
android:id="@+id/qr_code"
android:layout_width="164dp"
android:layout_height="164dp"
android:layout_gravity="center_horizontal"
android:visibility="invisible"
tools:src="@drawable/ic_about_mc_80"
tools:visibility="visible" />
<org.thoughtcrime.securesms.components.SquareImageView
android:id="@+id/qr_verified"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:background="@drawable/circle_tintable"
android:backgroundTint="@color/green_500"
android:src="@drawable/ic_check_white_48dp"
android:visibility="gone"
tools:visibility="visible" />
</FrameLayout>
<TextSwitcher
android:id="@+id/tap_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="27dp"
android:inAnimation="@android:anim/fade_in"
android:outAnimation="@android:anim/fade_out">
<TextView
style="@style/Signal.Text.Preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:text="@string/verify_display_fragment__tap_to_scan"
android:textColor="@color/core_grey_50"
android:textSize="11sp" />
<TextView
style="@style/Signal.Text.Preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:text="@string/verify_display_fragment__successful_match"
android:textColor="@color/core_grey_50"
android:textSize="11sp" />
</TextSwitcher>
</LinearLayout>
<TableLayout
android:id="@+id/number_table"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/verify_identity_vertical_margin"
android:clickable="true"
android:focusable="true">
<TableRow
android:clickable="false"
android:focusable="false"
android:gravity="center_horizontal">
<TextView
android:id="@+id/code_first"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="22934" />
<TextView
android:id="@+id/code_second"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="56944" />
<TextView
android:id="@+id/code_third"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="42738" />
<TextView
android:id="@+id/code_fourth"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="20038" />
</TableRow>
<TableRow android:gravity="center_horizontal">
<TextView
android:id="@+id/code_fifth"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="34431" />
<TextView
android:id="@+id/code_sixth"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="24922" />
<TextView
android:id="@+id/code_seventh"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="58594" />
<TextView
android:id="@+id/code_eighth"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="24109" />
</TableRow>
<TableRow android:gravity="center_horizontal">
<TextView
android:id="@+id/code_ninth"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="00257" />
<TextView
android:id="@+id/code_tenth"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="34956" />
<TextView
android:id="@+id/code_eleventh"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="32440" />
<TextView
android:id="@+id/code_twelth"
style="@style/IdentityKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
tools:text="15774" />
</TableRow>
</TableLayout>
<TextView
android:id="@+id/description"
style="@style/TextAppearance.Signal.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="@dimen/verify_identity_vertical_margin"
android:layout_marginEnd="30dp"
android:gravity="center"
android:lineSpacingExtra="3sp"
android:text="@string/verify_display_fragment__to_verify_the_security_of_your_end_to_end_encryption_with_s" />
</LinearLayout>
</ScrollView>
<View
android:id="@+id/toolbar_shadow"
android:layout_width="match_parent"
android:layout_height="5dp"
android:visibility="gone"
android:background="@drawable/toolbar_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar"
tools:visibility="visible" />
<View
android:id="@+id/verify_identity_bottom_shadow"
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/bottom_toolbar_shadow"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/verify_button_container" />
<FrameLayout
android:id="@+id/verify_button_container"
android:layout_width="match_parent"
android:layout_height="96dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="parent">
<com.google.android.material.button.MaterialButton
android:id="@+id/verify_button"
style="@style/Signal.Widget.Button.Large.Primary"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginStart="48dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="48dp"
android:text="@string/verify_display_fragment__mark_as_verified"
android:textAllCaps="false"
android:textColor="@color/signal_accent_primary"
app:backgroundTint="@color/signal_inverse_transparent_10" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>