Added About activity

This commit is contained in:
Pierre HUBERT
2018-08-22 11:41:47 +02:00
parent ff078e9550
commit 5f6d7d8e1f
10 changed files with 219 additions and 1 deletions

View File

@ -0,0 +1,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="#3f51b5"
android:endColor="#283593"
android:startColor="#7986cb"
android:type="linear" />
</shape>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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"
tools:context=".ui.activities.AboutActivity"
android:background="@drawable/activity_about_bg">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/opensource_btn"
style="@style/Base.TextAppearance.AppCompat.Widget.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:text="@string/btn_open_source_licences"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<WebView
android:id="@+id/webview"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toTopOf="@+id/opensource_btn"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
</android.support.constraint.ConstraintLayout>

View File

@ -12,6 +12,11 @@
android:id="@+id/action_settings"
android:title="@string/action_settings"/>
<!-- About activity -->
<item
android:id="@+id/action_about"
android:title="@string/action_about"/>
<!-- Sign out -->
<item
android:id="@+id/action_logout"

View File

@ -237,4 +237,5 @@
<string name="err_create_account_existing_email">Cette adresse est déjà associée à un compte Comunic existant !</string>
<string name="err_create_account_too_many_requests">Trop de création de compte. Veuillez réessayer ultérieurement.</string>
<string name="action_more">Plus</string>
<string name="action_about">A propos</string>
</resources>

View File

@ -236,4 +236,8 @@
<string name="err_create_account_existing_email">This email address is already associated with an account!</string>
<string name="err_create_account_too_many_requests">Too many account creation requests. Please try again later…</string>
<string name="action_more">More</string>
<string name="action_about">About</string>
<string name="activity_about_title">About</string>
<string name="dialog_open_source_licenses_title">Open Source Licenses</string>
<string name="btn_open_source_licences">Open Source Licences</string>
</resources>