Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
84320bfbf4 | |||
e08476881d | |||
12a6a241f3 | |||
9ad64ddac6 | |||
a7993ed680 | |||
f052470700 | |||
41676a6b54 | |||
ff04fb3102 | |||
514d1dff4e |
@ -15,8 +15,8 @@ android {
|
|||||||
applicationId "fr.sanchezm.attestationsCovid19"
|
applicationId "fr.sanchezm.attestationsCovid19"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 5
|
versionCode 10000
|
||||||
versionName "1.0.3"
|
versionName "1.0.4-alpha1"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -30,11 +30,28 @@ android {
|
|||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
buildConfigField "Integer", "DB_VERSION", "1"
|
buildConfigField "Integer", "DB_VERSION", db_version
|
||||||
buildConfigField "Boolean", "TEST", "false"
|
buildConfigField "Boolean", "TEST", "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
beta {
|
||||||
|
minifyEnabled true
|
||||||
|
shrinkResources true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
buildConfigField "Integer", "DB_VERSION", db_version
|
||||||
|
buildConfigField "Boolean", "TEST", "false"
|
||||||
|
}
|
||||||
|
|
||||||
|
alpha {
|
||||||
|
minifyEnabled true
|
||||||
|
shrinkResources true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
buildConfigField "Integer", "DB_VERSION", db_version
|
||||||
|
buildConfigField "Boolean", "TEST", "true"
|
||||||
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
buildConfigField "Integer", "DB_VERSION", "1"
|
buildConfigField "Integer", "DB_VERSION", db_version
|
||||||
buildConfigField "Boolean", "TEST", "true"
|
buildConfigField "Boolean", "TEST", "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -78,7 +95,8 @@ dependencies {
|
|||||||
|
|
||||||
// PDF
|
// PDF
|
||||||
implementation 'com.tom_roush:pdfbox-android:1.8.10.1'
|
implementation 'com.tom_roush:pdfbox-android:1.8.10.1'
|
||||||
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
|
//noinspection GradleDependency
|
||||||
|
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
|
||||||
|
|
||||||
// Gson
|
// Gson
|
||||||
implementation 'com.google.code.gson:gson:2.8.6'
|
implementation 'com.google.code.gson:gson:2.8.6'
|
||||||
@ -88,6 +106,8 @@ dependencies {
|
|||||||
//noinspection GradleDependency
|
//noinspection GradleDependency
|
||||||
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
|
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
|
||||||
|
|
||||||
|
implementation 'com.github.Ilhasoft:data-binding-validator:2.0.0'
|
||||||
|
|
||||||
// Test
|
// Test
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
|
tools:replace="android:allowBackup"
|
||||||
android:theme="@style/AppTheme.Light">
|
android:theme="@style/AppTheme.Light">
|
||||||
<activity android:name=".QrCodeActivity" />
|
<activity android:name=".QrCodeActivity" />
|
||||||
<activity android:name=".PdfViewerActivity" />
|
<activity android:name=".PdfViewerActivity" />
|
||||||
|
@ -3,7 +3,7 @@ package fr.sanchezm.attestationsCovid19.data.db.entity
|
|||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
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")
|
//@Entity(tableName = "attestation")
|
||||||
data class Attestation(
|
data class Attestation(
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package fr.sanchezm.attestationsCovid19.ui.info
|
package fr.sanchezm.attestationsCovid19.ui.info
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle
|
||||||
import android.text.method.LinkMovementMethod
|
import android.text.method.LinkMovementMethod
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater
|
||||||
import android.view.View;
|
import android.view.View
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import fr.sanchezm.attestationsCovid19.BuildConfig
|
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() {
|
class InfoFragment : Fragment() {
|
||||||
|
|
||||||
@ -20,13 +20,19 @@ class InfoFragment : Fragment() {
|
|||||||
): View? {
|
): View? {
|
||||||
val root = inflater.inflate(R.layout.fragment_info, container, false)
|
val root = inflater.inflate(R.layout.fragment_info, container, false)
|
||||||
|
|
||||||
root.findViewById<TextView>(R.id.develop_by).movementMethod = LinkMovementMethod.getInstance()
|
root.credits_1.movementMethod = LinkMovementMethod.getInstance()
|
||||||
root.findViewById<TextView>(R.id.version).text = getVersionText()
|
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
|
return root
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getVersionText(): String {
|
private fun getVersionText(): String {
|
||||||
val versionText = getString(R.string.version_number);
|
val versionText = getString(R.string.version_number)
|
||||||
val versionName = BuildConfig.VERSION_NAME
|
val versionName = BuildConfig.VERSION_NAME
|
||||||
|
|
||||||
return "$versionText $versionName"
|
return "$versionText $versionName"
|
||||||
|
@ -5,6 +5,7 @@ import android.view.View
|
|||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
|
import fr.sanchezm.attestationsCovid19.R
|
||||||
import fr.sanchezm.attestationsCovid19.data.db.entity.Attestation
|
import fr.sanchezm.attestationsCovid19.data.db.entity.Attestation
|
||||||
import fr.sanchezm.attestationsCovid19.data.repository.AttestationRepository
|
import fr.sanchezm.attestationsCovid19.data.repository.AttestationRepository
|
||||||
import fr.sanchezm.attestationsCovid19.data.repository.ConfigRepository
|
import fr.sanchezm.attestationsCovid19.data.repository.ConfigRepository
|
||||||
@ -28,6 +29,7 @@ class QrCodeViewModel(
|
|||||||
|
|
||||||
private val _startActivity = MutableLiveData<Event<Long>>()
|
private val _startActivity = MutableLiveData<Event<Long>>()
|
||||||
private val _finish = MutableLiveData<Event<Boolean>>()
|
private val _finish = MutableLiveData<Event<Boolean>>()
|
||||||
|
private val _error = MutableLiveData<Event<Int>>()
|
||||||
|
|
||||||
val attestation: LiveData<Attestation> = _attestation
|
val attestation: LiveData<Attestation> = _attestation
|
||||||
|
|
||||||
@ -40,6 +42,7 @@ class QrCodeViewModel(
|
|||||||
|
|
||||||
val startActivity: LiveData<Event<Long>> = _startActivity
|
val startActivity: LiveData<Event<Long>> = _startActivity
|
||||||
val finish: LiveData<Event<Boolean>> = _finish
|
val finish: LiveData<Event<Boolean>> = _finish
|
||||||
|
val error: LiveData<Event<Int>> = _error
|
||||||
|
|
||||||
fun addData(createAt: Long, toCreate: Boolean) {
|
fun addData(createAt: Long, toCreate: Boolean) {
|
||||||
val att = attestationRepository.getAttestation(createAt)
|
val att = attestationRepository.getAttestation(createAt)
|
||||||
@ -69,6 +72,8 @@ class QrCodeViewModel(
|
|||||||
) { success ->
|
) { success ->
|
||||||
if (success)
|
if (success)
|
||||||
displayQrCode()
|
displayQrCode()
|
||||||
|
else
|
||||||
|
_error.value = Event(R.string.error_failed_create_pdf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class PdfUtils private constructor(
|
|||||||
val acroForm = docCatalog.acroForm
|
val acroForm = docCatalog.acroForm
|
||||||
|
|
||||||
// Adding data
|
// Adding data
|
||||||
setFieldsData(acroForm, attestation)
|
if (setFieldsData(acroForm, attestation)) {
|
||||||
setCheckboxFields(acroForm, attestation)
|
setCheckboxFields(acroForm, attestation)
|
||||||
addPageWithQrCode(document, attestation)
|
addPageWithQrCode(document, attestation)
|
||||||
|
|
||||||
@ -41,6 +41,9 @@ class PdfUtils private constructor(
|
|||||||
document.save(getPath(attestation.createAt))
|
document.save(getPath(attestation.createAt))
|
||||||
document.close()
|
document.close()
|
||||||
callback(true)
|
callback(true)
|
||||||
|
} else {
|
||||||
|
callback(false)
|
||||||
|
}
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
callback(false)
|
callback(false)
|
||||||
@ -106,9 +109,10 @@ class PdfUtils private constructor(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setFieldsData(acroForm: PDAcroForm, attestation: Attestation) {
|
private fun setFieldsData(acroForm: PDAcroForm, attestation: Attestation): Boolean {
|
||||||
val profile = attestation.profile
|
val profile = attestation.profile
|
||||||
|
|
||||||
|
try {
|
||||||
// Init Fields
|
// Init Fields
|
||||||
val namesField = acroForm.getField("Nom et prénom") as PDTextField
|
val namesField = acroForm.getField("Nom et prénom") as PDTextField
|
||||||
val birthdayField = acroForm.getField("Date de naissance") as PDTextField
|
val birthdayField = acroForm.getField("Date de naissance") as PDTextField
|
||||||
@ -128,7 +132,11 @@ class PdfUtils private constructor(
|
|||||||
dateField.value = attestation.exitDate
|
dateField.value = attestation.exitDate
|
||||||
hourField.value = attestation.exitHour.split("h")[0]
|
hourField.value = attestation.exitHour.split("h")[0]
|
||||||
minutesField.value = attestation.exitHour.split("h")[1]
|
minutesField.value = attestation.exitHour.split("h")[1]
|
||||||
|
return true
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e(TAG, "${e.message}")
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setCheckboxFields(acroForm: PDAcroForm, attestation: Attestation) {
|
private fun setCheckboxFields(acroForm: PDAcroForm, attestation: Attestation) {
|
||||||
@ -150,6 +158,7 @@ class PdfUtils private constructor(
|
|||||||
private var instance: PdfUtils? = null
|
private var instance: PdfUtils? = null
|
||||||
private val LOCK = Any()
|
private val LOCK = Any()
|
||||||
private const val folderPath = "attestations"
|
private const val folderPath = "attestations"
|
||||||
|
private val TAG = PdfUtils::class.simpleName
|
||||||
|
|
||||||
fun getInstance() = instance
|
fun getInstance() = instance
|
||||||
|
|
||||||
|
@ -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>
|
|
@ -88,7 +88,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="date"
|
android:inputType="date"
|
||||||
android:text="@={viewModel.birthday}" />
|
android:text="@={viewModel.birthday}"
|
||||||
|
app:validateDate='@{"dd/MM/yyyy"}'
|
||||||
|
app:validateDateMessage="@{@string/date_error_message}"/>
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
@ -163,7 +165,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:inputType="date"
|
android:inputType="date"
|
||||||
android:text="@={viewModel.exitDate}" />
|
android:text="@={viewModel.exitDate}"
|
||||||
|
app:validateDate='@{"dd/MM/yyyy"}'
|
||||||
|
app:validateDateMessage="@{@string/date_error_message}"/>
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
@ -52,6 +52,58 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/explication_3" />
|
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
|
<TextView
|
||||||
android:id="@+id/develop_by"
|
android:id="@+id/develop_by"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<style name="TextView">
|
<style name="TextView">
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
<item name="android:layout_height">wrap_content</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:textColor">@color/colorPrimary</item>
|
||||||
<item name="android:textSize">@dimen/textSize18sp</item>
|
<item name="android:textSize">@dimen/textSize18sp</item>
|
||||||
<item name="android:justificationMode">inter_word</item>
|
<item name="android:justificationMode">inter_word</item>
|
||||||
|
9
app/src/main/res/values/errors.xml
Normal file
9
app/src/main/res/values/errors.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<!-- Validator -->
|
||||||
|
<string name="date_error_message">Votre date doit être au format 01/01/1970</string>
|
||||||
|
|
||||||
|
<string name="error_cannot_create_attestation">Erreur lors de la génération de l\'attestation, tout les champs ne sont pas compléter</string>
|
||||||
|
<string name="error_failed_create_pdf">Erreur lors de la génération de l\'attestion, veuillez vérifiez vos champs ou contacter le développeur.</string>
|
||||||
|
</resources>
|
@ -7,7 +7,6 @@
|
|||||||
<!-- Attestation Fragment -->
|
<!-- Attestation Fragment -->
|
||||||
<string name="attestation_title">Attestation de déplacement dérogatoire</string>
|
<string name="attestation_title">Attestation de déplacement dérogatoire</string>
|
||||||
<string name="attestation_subtitle">#RestonsChezNous</string>
|
<string name="attestation_subtitle">#RestonsChezNous</string>
|
||||||
<string name="error_cannot_create_attestation">Erreur lors de la génération de l\'attestation, tout les champs ne sont pas compléter</string>
|
|
||||||
<string name="attestation_generated">Attestation générer</string>
|
<string name="attestation_generated">Attestation générer</string>
|
||||||
<string name="no_attestation">Aucune attestation, veuillez en générer une.</string>
|
<string name="no_attestation">Aucune attestation, veuillez en générer une.</string>
|
||||||
|
|
||||||
@ -34,11 +33,17 @@
|
|||||||
<string name="reason_7">Participation à des missions d’intérêt général sur demande de l’autorité administrative.</string>
|
<string name="reason_7">Participation à des missions d’intérêt général sur demande de l’autorité administrative.</string>
|
||||||
|
|
||||||
<!-- Info Fragment -->
|
<!-- Info Fragment -->
|
||||||
<string name="explication_1">- Merci de n\'utiliser l\'application quand cas de nécessité.</string>
|
<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_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_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="explication_4">- Application non gouvernementale ni officielle, développée par un étudiant.</string>
|
||||||
<string name="develop_by">"Développer avec ❤️ par
|
<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>
|
<a href="https://www.sanchezm.fr/">Mathieu Sanchez</a>"</string>
|
||||||
<string name="version_number">Version :</string>
|
<string name="version_number">Version :</string>
|
||||||
|
|
||||||
|
@ -37,14 +37,20 @@
|
|||||||
<style name="TextView" parent="Widget.MaterialComponents.TextView">
|
<style name="TextView" parent="Widget.MaterialComponents.TextView">
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
<item name="android:layout_height">wrap_content</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:textColor">@color/colorPrimary</item>
|
||||||
<item name="android:textSize">@dimen/textSize18sp</item>
|
<item name="android:textSize">@dimen/textSize18sp</item>
|
||||||
</style>
|
</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="textSize18sp">18sp</dimen>
|
||||||
|
<dimen name="textSize14sp">14sp</dimen>
|
||||||
<dimen name="textInputCornerRadius">20dp</dimen>
|
<dimen name="textInputCornerRadius">20dp</dimen>
|
||||||
<dimen name="margin20dp">20dp</dimen>
|
<dimen name="margin15dp">15dp</dimen>
|
||||||
<dimen name="margin5dp">5dp</dimen>
|
<dimen name="margin5dp">5dp</dimen>
|
||||||
<dimen name="emptySize">0dp</dimen>
|
<dimen name="emptySize">0dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.3.72'
|
ext {
|
||||||
|
kotlin_version = '1.3.72'
|
||||||
|
db_version = '1'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
@ -20,7 +25,7 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user