Compare commits
No commits in common. "master" and "ms/issue-16/update_new_attestation" have entirely different histories.
master
...
ms/issue-1
@ -8,15 +8,15 @@ android {
|
|||||||
buildToolsVersion "29.0.3"
|
buildToolsVersion "29.0.3"
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
dataBinding true
|
dataBinding = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "fr.sanchezm.attestationsCovid19"
|
applicationId "fr.sanchezm.attestationsCovid19"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 13
|
versionCode 9
|
||||||
versionName "2.2.0"
|
versionName "2.0.0"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -76,13 +76,15 @@ dependencies {
|
|||||||
// Android X
|
// Android X
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
implementation 'androidx.core:core-ktx:1.3.2'
|
implementation 'androidx.core:core-ktx:1.3.2'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
||||||
|
|
||||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.2'
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1'
|
||||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.2'
|
implementation 'androidx.navigation:navigation-fragment:2.3.1'
|
||||||
|
implementation 'androidx.navigation:navigation-ui-ktx:2.3.1'
|
||||||
|
implementation 'androidx.navigation:navigation-ui:2.3.1'
|
||||||
|
|
||||||
// Design
|
// Design
|
||||||
implementation 'com.google.android.material:material:1.2.1'
|
implementation 'com.google.android.material:material:1.2.1'
|
||||||
|
Binary file not shown.
@ -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 'à' HH:mm"
|
const val PATTERN = "dd/MM/yyyy 'à' HH'h'mm"
|
||||||
|
|
||||||
//@Entity(tableName = "attestation")
|
//@Entity(tableName = "attestation")
|
||||||
data class Attestation(
|
data class Attestation(
|
||||||
@ -14,7 +14,7 @@ data class Attestation(
|
|||||||
val reasons: List<Int>
|
val reasons: List<Int>
|
||||||
) {
|
) {
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "Cree le: ${getDate(createAt)};\n$profile;\nSortie: ${getExitDateFormatted()};\nMotifs: ${getMotifsText()}"
|
return "Cree le: ${getDate(createAt)}; $profile; Sortie: ${getExitDateFormatted()}; Motifs: ${getMotifsText()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getNameFormatted(): String = "${profile.firstName} ${profile.lastName}"
|
fun getNameFormatted(): String = "${profile.firstName} ${profile.lastName}"
|
||||||
@ -28,8 +28,8 @@ data class Attestation(
|
|||||||
private fun getMotifsText(): String {
|
private fun getMotifsText(): String {
|
||||||
val motifs = StringBuilder()
|
val motifs = StringBuilder()
|
||||||
|
|
||||||
reasons.forEach { motifs.append(getMotifText(it), ", ") }
|
reasons.forEach { motifs.append(getMotifText(it), "-") }
|
||||||
return motifs.toString().dropLast(2)
|
return motifs.toString().dropLast(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getDate(dateTime: Long): String = SimpleDateFormat(PATTERN, Locale.FRANCE).format(Date(dateTime))
|
private fun getDate(dateTime: Long): String = SimpleDateFormat(PATTERN, Locale.FRANCE).format(Date(dateTime))
|
||||||
@ -37,13 +37,14 @@ data class Attestation(
|
|||||||
fun getMotifText(i: Int): String {
|
fun getMotifText(i: Int): String {
|
||||||
return when (i) {
|
return when (i) {
|
||||||
1 -> "travail"
|
1 -> "travail"
|
||||||
2 -> "sante"
|
2 -> "achats"
|
||||||
3 -> "famille"
|
3 -> "sante"
|
||||||
4 -> "handicap"
|
4 -> "famille"
|
||||||
5 -> "convocation"
|
5 -> "handicap"
|
||||||
6 -> "missions"
|
6 -> "sport_animaux"
|
||||||
7 -> "transits"
|
7 -> "convocation"
|
||||||
8 -> "animaux"
|
8 -> "missions"
|
||||||
|
9 -> "enfants"
|
||||||
else -> "Error $i not found"
|
else -> "Error $i not found"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,6 @@ data class Profile(
|
|||||||
// var id: Int = CURRENT_PROFILE_ID
|
// var id: Int = CURRENT_PROFILE_ID
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "Nom: $lastName;\nPrenom: $firstName;\nNaissance: $birthday a $birthPlace;\nAdresse: $address $postalCode $city"
|
return "Nom: $lastName; Prenom: $firstName; Naissance: $birthday a $birthPlace; Adresse: $address $postalCode $city"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,6 @@
|
|||||||
package fr.sanchezm.attestationsCovid19.ui.add
|
package fr.sanchezm.attestationsCovid19.ui.add
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.DatePickerDialog
|
|
||||||
import android.app.TimePickerDialog
|
|
||||||
import android.content.Context
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
@ -16,7 +13,6 @@ import fr.sanchezm.attestationsCovid19.data.repository.AttestationRepository
|
|||||||
import fr.sanchezm.attestationsCovid19.data.repository.ConfigRepository
|
import fr.sanchezm.attestationsCovid19.data.repository.ConfigRepository
|
||||||
import fr.sanchezm.attestationsCovid19.data.repository.ProfileRepository
|
import fr.sanchezm.attestationsCovid19.data.repository.ProfileRepository
|
||||||
import fr.sanchezm.attestationsCovid19.utilities.Event
|
import fr.sanchezm.attestationsCovid19.utilities.Event
|
||||||
import java.text.DateFormat
|
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
import java.time.format.DateTimeFormatter
|
import java.time.format.DateTimeFormatter
|
||||||
@ -25,8 +21,7 @@ import java.util.*
|
|||||||
class AddViewModel(
|
class AddViewModel(
|
||||||
private val configRepository: ConfigRepository,
|
private val configRepository: ConfigRepository,
|
||||||
private val profileRepository: ProfileRepository,
|
private val profileRepository: ProfileRepository,
|
||||||
private val attestationRepository: AttestationRepository,
|
private val attestationRepository: AttestationRepository
|
||||||
private val app: Context
|
|
||||||
) : ViewModel() {
|
) : ViewModel() {
|
||||||
|
|
||||||
private val _errorMessage = MutableLiveData<Event<Int>>()
|
private val _errorMessage = MutableLiveData<Event<Int>>()
|
||||||
@ -61,10 +56,11 @@ class AddViewModel(
|
|||||||
val reason6 = MutableLiveData(false)
|
val reason6 = MutableLiveData(false)
|
||||||
val reason7 = MutableLiveData(false)
|
val reason7 = MutableLiveData(false)
|
||||||
val reason8 = MutableLiveData(false)
|
val reason8 = MutableLiveData(false)
|
||||||
|
val reason9 = MutableLiveData(false)
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
private val datePattern = "dd/MM/yyyy"
|
private val datePattern = "dd/MM/yyyy"
|
||||||
private val timePattern = "HH:mm"
|
private val timePattern = "HH'h'mm"
|
||||||
|
|
||||||
@SuppressLint("LongLogTag")
|
@SuppressLint("LongLogTag")
|
||||||
fun onGenerateAttestationClick() {
|
fun onGenerateAttestationClick() {
|
||||||
@ -81,68 +77,6 @@ class AddViewModel(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onBirthdayClick() {
|
|
||||||
val c = Calendar.getInstance().also { it.set(1970, 0, 1) }
|
|
||||||
if (!birthday.value.isNullOrBlank()) {
|
|
||||||
birthday.value?.let { birthday ->
|
|
||||||
DateFormat.getDateInstance(DateFormat.SHORT, Locale.FRANCE).parse(birthday)
|
|
||||||
?.let { c.time = it }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val year = c.get(Calendar.YEAR)
|
|
||||||
val month = c.get(Calendar.MONTH)
|
|
||||||
val day = c.get(Calendar.DAY_OF_MONTH)
|
|
||||||
|
|
||||||
val dpd = DatePickerDialog(
|
|
||||||
app,
|
|
||||||
{ _, yearPicked, monthOfYear, dayOfMonth ->
|
|
||||||
birthday.value =
|
|
||||||
"${getFormattedDayOrMonth(dayOfMonth)}/${getFormattedDayOrMonth(monthOfYear + 1)}/$yearPicked"
|
|
||||||
},
|
|
||||||
year,
|
|
||||||
month,
|
|
||||||
day
|
|
||||||
)
|
|
||||||
dpd.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun onExitDateClick() {
|
|
||||||
val c = Calendar.getInstance()
|
|
||||||
val year = c.get(Calendar.YEAR)
|
|
||||||
val month = c.get(Calendar.MONTH)
|
|
||||||
val day = c.get(Calendar.DAY_OF_MONTH)
|
|
||||||
|
|
||||||
val dpd = DatePickerDialog(
|
|
||||||
app,
|
|
||||||
DatePickerDialog.OnDateSetListener { _, yearPicked, monthOfYear, dayOfMonth ->
|
|
||||||
exitDate.value =
|
|
||||||
"${getFormattedDayOrMonth(dayOfMonth)}/${getFormattedDayOrMonth(monthOfYear + 1)}/$yearPicked"
|
|
||||||
},
|
|
||||||
year,
|
|
||||||
month,
|
|
||||||
day
|
|
||||||
)
|
|
||||||
dpd.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun onExitHourClick() {
|
|
||||||
val c = Calendar.getInstance()
|
|
||||||
val hour = c.get(Calendar.HOUR_OF_DAY)
|
|
||||||
val minute = c.get(Calendar.MINUTE)
|
|
||||||
|
|
||||||
val tpd = TimePickerDialog(
|
|
||||||
app,
|
|
||||||
TimePickerDialog.OnTimeSetListener { _, hourPicked, minutePicked ->
|
|
||||||
exitHour.value =
|
|
||||||
"${getFormattedDayOrMonth(hourPicked)}:${getFormattedDayOrMonth(minutePicked)}"
|
|
||||||
},
|
|
||||||
hour,
|
|
||||||
minute,
|
|
||||||
true
|
|
||||||
)
|
|
||||||
tpd.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
setProfileValue()
|
setProfileValue()
|
||||||
setDateHourToday()
|
setDateHourToday()
|
||||||
@ -206,6 +140,7 @@ class AddViewModel(
|
|||||||
if (reason6.value!!) reasons.add(6)
|
if (reason6.value!!) reasons.add(6)
|
||||||
if (reason7.value!!) reasons.add(7)
|
if (reason7.value!!) reasons.add(7)
|
||||||
if (reason8.value!!) reasons.add(8)
|
if (reason8.value!!) reasons.add(8)
|
||||||
|
if (reason9.value!!) reasons.add(9)
|
||||||
|
|
||||||
return reasons
|
return reasons
|
||||||
}
|
}
|
||||||
@ -232,15 +167,7 @@ class AddViewModel(
|
|||||||
|| reason6.value!!
|
|| reason6.value!!
|
||||||
|| reason7.value!!
|
|| reason7.value!!
|
||||||
|| reason8.value!!
|
|| reason8.value!!
|
||||||
}
|
|| reason9.value!!
|
||||||
|
|
||||||
private fun getFormattedDayOrMonth(date: Int): String {
|
|
||||||
var formattedDate: String = date.toString()
|
|
||||||
|
|
||||||
if (formattedDate.length <= 1) {
|
|
||||||
formattedDate = "0$formattedDate"
|
|
||||||
}
|
|
||||||
return formattedDate
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
package fr.sanchezm.attestationsCovid19.ui.add
|
package fr.sanchezm.attestationsCovid19.ui.add
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import fr.sanchezm.attestationsCovid19.data.repository.AttestationRepository
|
import fr.sanchezm.attestationsCovid19.data.repository.AttestationRepository
|
||||||
@ -10,13 +9,12 @@ import fr.sanchezm.attestationsCovid19.data.repository.ProfileRepository
|
|||||||
class AddViewModelFactory(
|
class AddViewModelFactory(
|
||||||
private val configRepository: ConfigRepository,
|
private val configRepository: ConfigRepository,
|
||||||
private val profileRepository: ProfileRepository,
|
private val profileRepository: ProfileRepository,
|
||||||
private val attestationRepository: AttestationRepository,
|
private val attestationRepository: AttestationRepository
|
||||||
private val app: Context
|
|
||||||
) :
|
) :
|
||||||
ViewModelProvider.NewInstanceFactory() {
|
ViewModelProvider.NewInstanceFactory() {
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
|
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
|
||||||
return AddViewModel(configRepository, profileRepository, attestationRepository, app) as T
|
return AddViewModel(configRepository, profileRepository, attestationRepository) as T
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -20,7 +20,6 @@ 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.explication_4.movementMethod = LinkMovementMethod.getInstance()
|
|
||||||
root.credits_1.movementMethod = LinkMovementMethod.getInstance()
|
root.credits_1.movementMethod = LinkMovementMethod.getInstance()
|
||||||
root.credits_2.movementMethod = LinkMovementMethod.getInstance()
|
root.credits_2.movementMethod = LinkMovementMethod.getInstance()
|
||||||
root.credits_3.movementMethod = LinkMovementMethod.getInstance()
|
root.credits_3.movementMethod = LinkMovementMethod.getInstance()
|
||||||
|
@ -16,8 +16,7 @@ object InjectorUtils {
|
|||||||
AddViewModelFactory(
|
AddViewModelFactory(
|
||||||
getConfigRepo(context),
|
getConfigRepo(context),
|
||||||
getProfileRepo(context),
|
getProfileRepo(context),
|
||||||
getAttestationRepo(context),
|
getAttestationRepo(context)
|
||||||
context
|
|
||||||
)
|
)
|
||||||
|
|
||||||
fun provideAttestationViewModel(context: Context): AttestationsViewModelFactory =
|
fun provideAttestationViewModel(context: Context): AttestationsViewModelFactory =
|
||||||
|
@ -54,7 +54,7 @@ class PdfUtils private constructor(
|
|||||||
|
|
||||||
private fun addPageWithQrCode(document: PDDocument, attestation: Attestation) {
|
private fun addPageWithQrCode(document: PDDocument, attestation: Attestation) {
|
||||||
val size = 360
|
val size = 360
|
||||||
val margin = 25f
|
val margin = 40f
|
||||||
|
|
||||||
// Add QRCode on the first page
|
// Add QRCode on the first page
|
||||||
val page1: PDPage = document.pages.first()
|
val page1: PDPage = document.pages.first()
|
||||||
@ -64,8 +64,8 @@ class PdfUtils private constructor(
|
|||||||
page1,
|
page1,
|
||||||
attestation,
|
attestation,
|
||||||
size / 3,
|
size / 3,
|
||||||
page1.mediaBox.upperRightX - margin - size / 3,
|
page1.mediaBox.upperRightX - margin - size / 3 - 30,
|
||||||
25f
|
99f
|
||||||
)
|
)
|
||||||
|
|
||||||
// Add QRCode on a new page
|
// Add QRCode on a new page
|
||||||
@ -122,7 +122,7 @@ class PdfUtils private constructor(
|
|||||||
|
|
||||||
private fun setCheckboxFields(acroForm: PDAcroForm, attestation: Attestation) {
|
private fun setCheckboxFields(acroForm: PDAcroForm, attestation: Attestation) {
|
||||||
attestation.reasons.forEach {
|
attestation.reasons.forEach {
|
||||||
(acroForm.getField("distinction Motif $it") as PDCheckbox).check()
|
(acroForm.getField(attestation.getMotifText(it)) as PDCheckbox).check()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:context=".ui.add.AddFragment">
|
tools:context=".ui.add.AddFragment">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
@ -12,9 +12,9 @@
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/constraintContext"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/constraintContext">
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -34,10 +34,10 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
android:text="@string/attestation_title"
|
android:text="@string/attestation_title"
|
||||||
android:textColor="?attr/colorPrimary"
|
android:textColor="?attr/colorPrimary"
|
||||||
android:textSize="25sp"
|
android:textSize="25sp" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -88,8 +88,6 @@
|
|||||||
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:focusable="false"
|
|
||||||
android:onClick="@{() -> viewModel.onBirthdayClick()}"
|
|
||||||
android:text="@={viewModel.birthday}"
|
android:text="@={viewModel.birthday}"
|
||||||
app:validateDate='@{"dd/MM/yyyy"}'
|
app:validateDate='@{"dd/MM/yyyy"}'
|
||||||
app:validateDateMessage="@{@string/date_error_message}"/>
|
app:validateDateMessage="@{@string/date_error_message}"/>
|
||||||
@ -166,9 +164,7 @@
|
|||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:focusable="false"
|
|
||||||
android:inputType="date"
|
android:inputType="date"
|
||||||
android:onClick="@{() -> viewModel.onExitDateClick()}"
|
|
||||||
android:text="@={viewModel.exitDate}"
|
android:text="@={viewModel.exitDate}"
|
||||||
app:validateDate='@{"dd/MM/yyyy"}'
|
app:validateDate='@{"dd/MM/yyyy"}'
|
||||||
app:validateDateMessage="@{@string/date_error_message}"/>
|
app:validateDateMessage="@{@string/date_error_message}"/>
|
||||||
@ -185,9 +181,7 @@
|
|||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:focusable="false"
|
|
||||||
android:inputType="time"
|
android:inputType="time"
|
||||||
android:onClick="@{() -> viewModel.onExitHourClick()}"
|
|
||||||
android:text="@={viewModel.exitHour}" />
|
android:text="@={viewModel.exitHour}" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
@ -264,6 +258,14 @@
|
|||||||
android:checked="@={viewModel.reason8}"
|
android:checked="@={viewModel.reason8}"
|
||||||
android:text="@string/reason_8" />
|
android:text="@string/reason_8" />
|
||||||
|
|
||||||
|
<com.google.android.material.checkbox.MaterialCheckBox
|
||||||
|
android:id="@+id/reason_9"
|
||||||
|
style="@style/MaterialCheckBox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="@={viewModel.reason9}"
|
||||||
|
android:text="@string/reason_9" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/generate_attestation"
|
android:id="@+id/generate_attestation"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -271,6 +273,7 @@
|
|||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:onClick="@{() -> viewModel.onGenerateAttestationClick()}"
|
android:onClick="@{() -> viewModel.onGenerateAttestationClick()}"
|
||||||
android:text="@string/generate_attestation_button" />
|
android:text="@string/generate_attestation_button" />
|
||||||
|
<!-- android:enabled="false"-->
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/explication_1"
|
android:id="@+id/explication_1"
|
||||||
android:text="@string/explication_1"
|
android:text="@string/explication_1"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="40dp"
|
||||||
style="@style/TextView"
|
style="@style/TextView"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@ -52,6 +52,14 @@
|
|||||||
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:id="@+id/explication_5"
|
||||||
|
android:text="@string/explication_5"
|
||||||
|
style="@style/TextView"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/explication_4" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:id="@+id/credits_title"
|
android:id="@+id/credits_title"
|
||||||
@ -61,7 +69,7 @@
|
|||||||
style="@style/TextViewCredits"
|
style="@style/TextViewCredits"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/explication_4" />
|
app:layout_constraintTop_toBottomOf="@+id/explication_5" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
@ -20,30 +20,32 @@
|
|||||||
<string name="postal_code">Code Postal</string>
|
<string name="postal_code">Code Postal</string>
|
||||||
<string name="exit_date">Date de sortie</string>
|
<string name="exit_date">Date de sortie</string>
|
||||||
<string name="exit_hour">Heure de sortie</string>
|
<string name="exit_hour">Heure de sortie</string>
|
||||||
<string name="generate_attestation_button">Générer l’attestation</string>
|
<string name="generate_attestation_button">Générer l\'attestation</string>
|
||||||
|
|
||||||
<!-- Reasons for leaving house -->
|
<!-- Reasons for leaving house -->
|
||||||
<string name="reason">Je certifie que mon déplacement est lié au(x) motif(s) suivant (cocher la case) autorisé en application des mesures générales nécessaires pour faire face à l’épidémie de Covid19 dans le cadre de l’état d’urgence sanitaire :</string>
|
<string name="reason">Je certifie que mon déplacement est lié au motif suivant (cocher la case) autorisé en application des mesures générales nécessaires pour faire face à l\'épidémie de Covid19 dans le cadre de l\'état d\'urgence sanitaire :</string>
|
||||||
<string name="reason_1">1. Déplacements entre le domicile et le lieu d’exercice de l’activité professionnelle ou le lieu d’enseignement et de formation, déplacements professionnels ne pouvant être différés.</string>
|
<string name="reason_1">Déplacements entre le domicile et le lieu d\'exercice de l\'activité professionnelle ou les déplacements professionnels ne pouvant être différés.</string>
|
||||||
<string name="reason_2">2. Déplacements pour des consultations et soins ne pouvant être assurés à distance et ne pouvant être différés ou pour l’achat de produits de santé.</string>
|
<string name="reason_2">Déplacements pour effectuer des achats de fournitures nécessaires à l\'activité professionnelle, des achats de première nécessité dans des établissements dont les activités demeurent autorisées (liste sur gouvernement.fr) et les livraisons à domicile.</string>
|
||||||
<string name="reason_3">3. Déplacements pour motif familial impérieux, pour l’assistance aux personnes vulnérables ou précaires ou pour la garde d’enfants.</string>
|
<string name="reason_3">Consultations et soins ne pouvant être assurés à distance et ne pouvant être différés et l’achat de médicaments.</string>
|
||||||
<string name="reason_4">4. Déplacements des personnes en situation de handicap et de leur accompagnant.</string>
|
<string name="reason_4">Déplacements pour motif familial impérieux, pour l\'assistance aux personnes vulnérables et précaires ou la garde d\'enfants.</string>
|
||||||
<string name="reason_5">5. Déplacements pour répondre à une convocation judiciaire ou administrative.</string>
|
<string name="reason_5">Déplacements des personnes en situation de handicap et de leur accompagnant.</string>
|
||||||
<string name="reason_6">6. Déplacements pour participer à des missions d’intérêt général sur demande de l’autorité administrative.</string>
|
<string name="reason_6">Déplacements brefs, dans la limite d\'une heure quotidienne et dans un rayon maximal d\'un kilomètre autour du domicile, liés soit à l\'activité physique individuelle des personnes, à l\'exclusion de toute pratique sportive collective et de toute proximité avec d\'autres personnes, soit à la promenade avec les seules personnes regroupées dans un même domicile, soit aux besoins des animaux de compagnie.</string>
|
||||||
<string name="reason_7">7. Déplacements liés à des transits ferroviaires ou aériens pour des déplacements de longues distances.</string>
|
<string name="reason_7">Convocation judiciaire ou administrative et rendez-vous dans un service public.</string>
|
||||||
<string name="reason_8">8. Déplacements brefs, dans un rayon maximal d’un kilomètre autour du domicile pour les besoins des animaux de compagnie.</string>
|
<string name="reason_8">Participation à des missions d\'intérêt général sur demande de l\'autorité administrative.</string>
|
||||||
|
<string name="reason_9">Déplacement pour chercher les enfants à l’écoles et à l’occasion de leurs activités périscolaires.</string>
|
||||||
|
|
||||||
<!-- Info Fragment -->
|
<!-- Info Fragment -->
|
||||||
<string name="explication_1">- Cette application n’aura jamais de publicité.</string>
|
<string name="explication_1">- Merci de n\'utiliser l\'application qu\'en cas de nécessité.</string>
|
||||||
<string name="explication_2">- Toutes les données sont stockées uniquement sur votre téléphone, utilisable hors ligne.</string>
|
<string name="explication_2">- Cette application n\'aura jamais de publicité.</string>
|
||||||
<string name="explication_3">- Application non gouvernementale ni officielle, développée par un jeune diplômé.</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">- Si vous souhaitez m’offrir une bière ou un café, c’est <a href="https://buymeacoff.ee/sanchezm/">ici</a> ou vous pouvez me suivre sur <a href="https://www.twitch.tv/mathdieu">twitch</a>.</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ée au développement de l’application :</string>
|
<string name="explication_5">- J\'ai, moi-même été touché par ce virus, même à 22 ans il m\'a mis KO 2\-3 jours, faites attention à vous et à vos proches.</string>
|
||||||
|
<string name="credits_title">Petit remerciement pour l\'aide apportée 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_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_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_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_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="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
|
<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>
|
||||||
@ -56,6 +58,6 @@
|
|||||||
<!-- QR Fragment -->
|
<!-- QR Fragment -->
|
||||||
<string name="generating_attestation">Création de votre attesation</string>
|
<string name="generating_attestation">Création de votre attesation</string>
|
||||||
<string name="qrcode_attestation">QrCode Attestation</string>
|
<string name="qrcode_attestation">QrCode Attestation</string>
|
||||||
<string name="display_attestation">Afficher l’attestation</string>
|
<string name="display_attestation">Afficher l\'attestation</string>
|
||||||
<string name="delete_attestation">Supprimer l’attestation</string>
|
<string name="delete_attestation">Supprimer l\'attestation</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -37,9 +37,9 @@
|
|||||||
<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/margin5dp</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/textSize14sp</item>
|
<item name="android:textSize">@dimen/textSize18sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TextViewCredits" parent="TextView">
|
<style name="TextViewCredits" parent="TextView">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.4.21'
|
kotlin_version = '1.4.10'
|
||||||
db_version = '1'
|
db_version = '1'
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -13,7 +13,7 @@ buildscript {
|
|||||||
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
Loading…
Reference in New Issue
Block a user