Adding credits and correct spelling mistake

This commit is contained in:
Mathieu Sanchez 2020-04-29 17:20:11 +02:00
parent 41676a6b54
commit a7993ed680
7 changed files with 88 additions and 97 deletions

View File

@ -3,7 +3,7 @@ package fr.sanchezm.attestationsCovid19.data.db.entity
import java.text.SimpleDateFormat
import java.util.*
const val PATTERN = "dd/MM/yyyy 'a' HH'h'mm"
const val PATTERN = "dd/MM/yyyy 'à' HH'h'mm"
//@Entity(tableName = "attestation")
data class Attestation(

View File

@ -1,15 +1,15 @@
package fr.sanchezm.attestationsCovid19.ui.info
import android.os.Bundle;
import android.os.Bundle
import android.text.method.LinkMovementMethod
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import fr.sanchezm.attestationsCovid19.BuildConfig
import fr.sanchezm.attestationsCovid19.R;
import fr.sanchezm.attestationsCovid19.R
import kotlinx.android.synthetic.main.fragment_info.view.*
class InfoFragment : Fragment() {
@ -20,13 +20,19 @@ class InfoFragment : Fragment() {
): View? {
val root = inflater.inflate(R.layout.fragment_info, container, false)
root.findViewById<TextView>(R.id.develop_by).movementMethod = LinkMovementMethod.getInstance()
root.findViewById<TextView>(R.id.version).text = getVersionText()
root.credits_1.movementMethod = LinkMovementMethod.getInstance()
root.credits_2.movementMethod = LinkMovementMethod.getInstance()
root.credits_3.movementMethod = LinkMovementMethod.getInstance()
root.credits_4.movementMethod = LinkMovementMethod.getInstance()
root.credits_5.movementMethod = LinkMovementMethod.getInstance()
root.develop_by.movementMethod = LinkMovementMethod.getInstance()
root.version.text = getVersionText()
return root
}
private fun getVersionText(): String {
val versionText = getString(R.string.version_number);
val versionText = getString(R.string.version_number)
val versionName = BuildConfig.VERSION_NAME
return "$versionText $versionName"

View File

@ -1,79 +0,0 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="30dp"
android:paddingVertical="20dp">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:layout_marginTop="15dp"
android:textStyle="bold"
android:textColor="?attr/colorPrimaryDark"
android:text="@string/title_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/explication_1"
android:text="@string/explication_1"
android:layout_marginTop="40dp"
style="@style/TextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/title" />
<TextView
android:id="@+id/explication_2"
android:text="@string/explication_2"
style="@style/TextView"
android:justificationMode="inter_word"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explication_1" />
<TextView
android:id="@+id/explication_3"
android:text="@string/explication_3"
style="@style/TextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explication_2" />
<TextView
android:id="@+id/explication_4"
android:text="@string/explication_4"
style="@style/TextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explication_3" />
<TextView
android:id="@+id/develop_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="?attr/colorPrimaryDark"
android:text="@string/develop_by"
android:layout_marginBottom="5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/version" />
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/version_number"
android:textSize="12sp"
android:textColor="?attr/colorAccent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -52,6 +52,58 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explication_3" />
<TextView
android:layout_marginTop="20dp"
android:id="@+id/credits_title"
android:text="@string/credits_title"
android:textSize="17sp"
android:textStyle="bold"
style="@style/TextViewCredits"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explication_4" />
<TextView
android:layout_marginTop="10dp"
android:id="@+id/credits_1"
android:text="@string/credits_1"
style="@style/TextViewCredits"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/credits_title" />
<TextView
android:id="@+id/credits_2"
android:text="@string/credits_2"
style="@style/TextViewCredits"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/credits_1" />
<TextView
android:id="@+id/credits_3"
android:text="@string/credits_3"
style="@style/TextViewCredits"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/credits_2" />
<TextView
android:id="@+id/credits_4"
android:text="@string/credits_4"
style="@style/TextViewCredits"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/credits_3" />
<TextView
android:id="@+id/credits_5"
android:text="@string/credits_5"
style="@style/TextViewCredits"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/credits_4" />
<TextView
android:id="@+id/develop_by"
android:layout_width="wrap_content"

View File

@ -4,7 +4,7 @@
<style name="TextView">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">@dimen/margin20dp</item>
<item name="android:layout_marginTop">@dimen/margin15dp</item>
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:textSize">@dimen/textSize18sp</item>
<item name="android:justificationMode">inter_word</item>

View File

@ -33,11 +33,17 @@
<string name="reason_7">Participation à des missions dintérêt général sur demande de lautorité administrative.</string>
<!-- Info Fragment -->
<string name="explication_1">- Merci de n\'utiliser l\'application quand cas de nécessité.</string>
<string name="explication_2">- Cette application n\'aura jamais de publicité.</string>
<string name="explication_3">- Toutes les données sont stockées uniquement sur votre téléphone, utilisable hors ligne.</string>
<string name="explication_4">- Application non gouvernementale ni officiel, développer par un étudiant.</string>
<string name="develop_by">"Développer avec ❤️ par
<string name="explication_1">- Merci de n\'utiliser l\'application qu\'en cas de nécessité.</string>
<string name="explication_2">- Cette application n\'aura jamais de publicité.</string>
<string name="explication_3">- Toutes les données sont stockées uniquement sur votre téléphone, utilisable hors ligne.</string>
<string name="explication_4">- Application non gouvernementale ni officielle, développée par un étudiant.</string>
<string name="credits_title">Petit remerciement pour l\'aide apporté au développement de l\'application :</string>
<string name="credits_1">TomRoush: <a href="https://github.com/TomRoush/PdfBox-Android">PdfBox-Android</a></string>
<string name="credits_2">Barteksc: <a href="https://github.com/barteksc/AndroidPdfViewer">AndroidPdfViewer</a></string>
<string name="credits_3">Journeyapps: <a href="https://github.com/journeyapps/zxing-android-embedded">zxing-android-embedded</a></string>
<string name="credits_4">Ainsi que toutes les libraries fourni par google</string>
<string name="credits_5">Merci à <a href="https://www.linkedin.com/in/julienfabbro/">Fabbro J.</a> pour l\'aide sur l\'orthographe</string>
<string name="develop_by">"Développée avec ❤️ par
<a href="https://www.sanchezm.fr/">Mathieu Sanchez</a>"</string>
<string name="version_number">Version :</string>

View File

@ -37,14 +37,20 @@
<style name="TextView" parent="Widget.MaterialComponents.TextView">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">@dimen/margin20dp</item>
<item name="android:layout_marginTop">@dimen/margin15dp</item>
<item name="android:textColor">@color/colorPrimary</item>
<item name="android:textSize">@dimen/textSize18sp</item>
</style>
<style name="TextViewCredits" parent="TextView">
<item name="android:textSize">@dimen/textSize14sp</item>
<item name="android:layout_marginTop">@dimen/margin5dp</item>
</style>
<dimen name="textSize18sp">18sp</dimen>
<dimen name="textSize14sp">14sp</dimen>
<dimen name="textInputCornerRadius">20dp</dimen>
<dimen name="margin20dp">20dp</dimen>
<dimen name="margin15dp">15dp</dimen>
<dimen name="margin5dp">5dp</dimen>
<dimen name="emptySize">0dp</dimen>
</resources>