Show disclaimer at first launch (Fixes #215)

This commit is contained in:
Benoit Marty
2019-06-27 16:01:11 +02:00
parent f98f0e1a87
commit f9c8e4f85a
8 changed files with 227 additions and 2 deletions

View File

@ -0,0 +1,38 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="163dp"
android:height="127dp"
android:viewportWidth="163"
android:viewportHeight="127">
<path
android:pathData="M113.569,169.348C129.753,185.532 153.161,188.363 165.853,175.671C178.545,162.979 175.715,139.57 159.531,123.386C143.347,107.203 44.653,8.372 44.653,8.372L35.819,18.975C35.819,18.975 39.221,27.764 37.204,30.186C35.186,32.608 24.684,32.34 24.684,32.34L6.34,54.358C6.34,54.358 4.89,60.67 6.106,61.885C41.927,97.706 77.748,133.527 113.569,169.348Z"
android:strokeWidth="1"
android:fillColor="#000000"
android:fillAlpha="0.147508741"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
<path
android:pathData="M19.447,19.068L19.447,27.722L28.202,27.713C28.313,27.713 28.415,27.71 28.515,27.703C30.818,27.551 32.617,25.656 32.617,23.391C32.617,21.007 30.641,19.068 28.211,19.068L19.447,19.068ZM10.788,61.81C6.006,61.81 2.129,58.007 2.129,53.316L2.129,37.127C2.097,36.833 2.08,36.535 2.08,36.232C2.08,35.925 2.096,35.621 2.129,35.322L2.129,10.574C2.129,5.882 6.006,2.079 10.788,2.079L28.211,2.079C40.19,2.079 49.935,11.639 49.935,23.391C49.935,34.563 41.04,43.902 29.684,44.652C29.201,44.685 28.704,44.702 28.211,44.702L19.447,44.71L19.447,53.316C19.447,58.007 15.57,61.81 10.788,61.81L10.788,61.81Z"
android:strokeWidth="1"
android:fillColor="#A2DDEF"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
<path
android:pathData="M19.447,19.068L19.447,27.722L28.202,27.713C28.313,27.713 28.415,27.71 28.515,27.703C30.818,27.551 32.617,25.656 32.617,23.391C32.617,21.007 30.641,19.068 28.211,19.068L19.447,19.068ZM10.788,61.81C6.006,61.81 2.129,58.007 2.129,53.316L2.129,10.574C2.129,5.882 6.006,2.079 10.788,2.079L28.211,2.079C40.19,2.079 49.935,11.639 49.935,23.391C49.935,34.563 41.04,43.902 29.684,44.652C29.201,44.685 28.704,44.702 28.211,44.702L19.447,44.71L19.447,53.316C19.447,58.007 15.57,61.81 10.788,61.81Z"
android:strokeWidth="1.52445396"
android:fillColor="#00000000"
android:strokeColor="#368BD6"
android:fillType="evenOdd"/>
<path
android:pathData="M10.788,53.315L10.788,10.574L28.211,10.574C35.426,10.574 41.276,16.312 41.276,23.39C41.276,30.175 35.902,35.729 29.102,36.178C28.807,36.197 28.51,36.207 28.211,36.207L10.788,36.207"
android:strokeWidth="1.52445396"
android:fillColor="#00000000"
android:strokeColor="#368BD6"
android:fillType="evenOdd"
android:strokeLineCap="round"/>
<path
android:pathData="M17.923,5.702C19.25,7.56 19.76,9.815 19.358,12.048C18.956,14.283 17.691,16.229 15.795,17.531C11.881,20.217 6.467,19.282 3.726,15.445C2.399,13.587 1.889,11.333 2.291,9.099C2.693,6.864 3.958,4.917 5.854,3.617C9.768,0.93 15.182,1.865 17.923,5.702ZM41.347,61.805C38.618,61.805 35.934,60.543 34.248,58.185L22.011,41.052C19.266,37.21 20.217,31.913 24.133,29.222C28.049,26.528 33.449,27.461 36.193,31.303L48.431,48.435C51.175,52.277 50.225,57.574 46.309,60.266C44.797,61.306 43.063,61.805 41.347,61.805Z"
android:strokeWidth="1"
android:fillColor="#368BD6"
android:fillType="evenOdd"
android:strokeColor="#00000000"/>
</vector>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="140dp"
android:background="#27303A">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="23dp"
android:layout_marginLeft="23dp"
android:layout_marginTop="15dp"
android:src="@drawable/disclaimer_top_banner_foreground" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginLeft="24dp"
android:layout_marginTop="92dp"
android:fontFamily="sans-serif"
android:lineSpacingExtra="8sp"
android:text="@string/alpha_disclaimer_title"
android:textColor="@color/white"
android:textSize="24sp"
android:textStyle="normal" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="21dp"
android:layout_marginEnd="24dp"
android:text="@string/alpha_disclaimer_content_line_1"
android:textColor="?riotx_text_primary"
android:textSize="16sp" />
<TextView
android:id="@+id/dialogDisclaimerContentLine2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="21dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="21dp"
android:textColor="?riotx_text_primary"
android:textSize="16sp"
tools:text="@string/alpha_disclaimer_content_line_2_gplay" />
</LinearLayout>

View File

@ -3,6 +3,12 @@
<!-- Strings not defined in Riot -->
<string name="alpha_disclaimer_title">Welcome to the beta!</string>
<string name="alpha_disclaimer_content_line_1">"While Riot X is in early development, some features may be missing and you may experience bugs."</string>
<string name="alpha_disclaimer_content_line_2_gplay">"The latest feature list is always in the %1$s, and if you find bugs please submit a report in the top left menu of Home, and well fix them as quickly as we can."</string>
<!-- Must be a substring of value of alpha_disclaimer_content_line_2_gplay -->
<string name="alpha_disclaimer_content_line_2_gplay_colored_part">"Play Store description"</string>
<string name="alpha_disclaimer_content_line_2_fdroid">"If you find bugs please submit a report in the top left menu of Home, and well fix them as quickly as we can."</string>
<string name="import_e2e_keys_from_file">"Import e2e keys from file \"%1$s\"."</string>