Compare commits

..

44 commits

Author SHA1 Message Date
jacques
b29be4fc8a Create prefs dialog for backup/restore 2024-06-11 20:54:13 +02:00
jacques
95159673d5 Add Rackup/Restore framework 2024-06-11 20:54:13 +02:00
jacques
a593758fe5 Remove TODO 2024-06-11 20:54:13 +02:00
jacques
6e8ae6fc38 Remove redurant cast 2024-06-11 20:54:11 +02:00
jacques
d3bbfbbdc8 Change part of code according to AndroidStudio suggestions.
Add debug dialog code for the menu.
2024-06-11 20:54:03 +02:00
jacques
b0c738e017 Remove unused code 2024-06-11 20:48:21 +02:00
jacques
8c941b1c53 Remove unused code 2024-06-11 20:48:21 +02:00
jacques
5edc7f5f23 optimize 2024-06-11 20:48:20 +02:00
Jacques Foucry
fe87f520e5 Add WRITE_EXTERNAL_STORAGE permission 2024-06-11 20:48:04 +02:00
jacques
ecd0251ea6 Change some options in order to make compilation/run in avd work 2024-06-11 20:47:40 +02:00
Jean-Baptiste
53d6ab71f8 Add new string (#56) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
d5c9cb62df Update copyright (#46) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
c5abe34a6b Remove finish call method (#50) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
bcbec2eeb7 Add annotation to remove warnings (#51) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
51033c1b7f Migrate to AppCompatActivity (#53) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
55974e35f8 Update name of french directory strings (#47)
Great Idea
2024-06-11 20:47:40 +02:00
Jean-Baptiste
af57fdba72 Update gradle scripts (#48) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
4592a99fb7 Improve dialog (#43) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
f66e34546f Fix buttons not appears (#45) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
439dcbdce4 Improve RTL (#44) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
fda96848ec Use extend floating button (#42) 2024-06-11 20:47:40 +02:00
Jean-Baptiste
6ee7781767 Use more modern method (#40) 2024-06-11 20:47:39 +02:00
Jean-Baptiste
e7d8436a5e Fix icon used in welcome layout (#39)
Co-authored-by: Jacques Foucry <github@foucry.net>
2024-06-11 20:47:18 +02:00
Jean-Baptiste
ac465ce06d Fix link not opened (#38) 2024-06-11 20:47:18 +02:00
Jean-Baptiste
987490c5e2 Update changelog (#37) 2024-06-11 20:47:18 +02:00
Jean-Baptiste
ae27a0a7cc Update gradle files (#36) 2024-06-11 20:47:18 +02:00
Jean-Baptiste
debcf56ab4 Remove old files (#35) 2024-06-11 20:47:18 +02:00
Jean-Baptiste
1a3b245c0f Use compat library to load drawables (#33) 2024-06-11 20:47:18 +02:00
Jean-Baptiste
2fb0192c81 Remove duplicate call (#31) 2024-06-11 20:47:18 +02:00
Jean-Baptiste
51396b7888 Improve readme (#34)
* Improve readme

* Remove space
2024-06-11 20:47:18 +02:00
jacques
831daf329a add record in .gitignore 2024-06-11 20:47:18 +02:00
Jean-Baptiste
5be59a8308 Material 3 Migration (#26) 2024-06-11 20:47:17 +02:00
Jean-Baptiste
7d41b75cd3 Improve code of app (#28) 2024-06-11 20:46:56 +02:00
Jean-Baptiste
9ee2744b81 Fix gradle deprecation (#27)
* Remove build config in properties file

* Add build config property in main module
2024-06-11 20:46:56 +02:00
Jean-Baptiste
ef532393e4 Add onBackPressed method to do not generate crash (#29) 2024-06-11 20:46:56 +02:00
Jean-Baptiste
9658a3013f Update gradle (#21) 2024-06-11 20:46:56 +02:00
Jean-Baptiste
535de3c259 Update DrugListActivity (#22) 2024-06-11 20:46:56 +02:00
Jean-Baptiste
8269ef4618 Use lambda everywhere (#23) 2024-06-11 20:46:54 +02:00
Jean-Baptiste
df21e5835f Improve welcome activity (#24) 2024-06-11 20:45:53 +02:00
Jean-Baptiste
80f77a4c03 Improve drug detail activity (#25) 2024-06-11 20:45:53 +02:00
jacques
28260a08bc update somme dependencies, update compileSDK version, ugrade SDK
androidx.core:core cannot be updated, it generated to much error.
2024-06-11 20:45:53 +02:00
jacques
1cc8ac5de8 Remove cast 2024-06-11 20:45:53 +02:00
jacques
820a89fa80 Add new gray drawable for disabled button
Use the round_btn_disable drawable to show that de number of digit are not set.
2024-06-11 20:45:53 +02:00
jacques
7350cf0909 Add id to avoid null pointer exception 2024-06-11 20:45:53 +02:00
74 changed files with 957 additions and 2653 deletions

2
.gitignore vendored
View file

@ -47,4 +47,4 @@ Thumbs.db
gen/
/android-signing-keystore.jks
/secrets.properties
/java_pid9513.hprof
*.hprof

View file

@ -3,48 +3,53 @@
Pilldroid est une application de gestion de stock **théorique** de médicament à
destination des personnes résidant en France.
<a href="https://f-droid.org/packages/net.foucry.pilldroid">
<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">
</a>
## Ce que n'est pas Pilldroid
- Pilldroid n'est pas un pilulier. Pilldroid ne vous rappellera pas de prendre
vos médicaments, c'est **VOTRE** responsabilité ;
vos médicaments, c'est **VOTRE** responsabilité.
- Pilldroid n'est pas fiable, ce n'est qu'une aide. Seul votre stock réel est bon
;
- Pilldroid n'est pas fiable, ce n'est qu'une aide. Seul votre stock réel est bon.
- Pilldroid ne vous surveille pas.
## Pourquoi « Stock théorique » ?
Pilldroid ne sait (et n'a aucun moyen de savoir) si vous avez ou non pris vos
médicaments. Pilldroid effectue, simple calcul : `stock connus - prise par
médicaments. Pilldroid effectue, simple calcul : `stock connu - prise par
jour`. Ce calcul est fait tous les jours entre 11h et midi.
## De quelles autorisations l'application Pilldroid a-t-elle besoin ?
- Pilldroid a besoin de savoir que le téléphone a été redémarré pour elle-même
lancer son cycle de réveil journalier ;
lancer son cycle de réveil journalier.
- Pilldroid a besoin d'accéder à l'appareil photo de votre téléphone pour
scanner le code barre des boites de médicaments ;
- Pilldroid a besoin de pouvoir vous envoyer des alarmes ;
- Pilldroid a besoin de faire vibrer le téléphone pour les alarmes ;
scanner le code-barres des boîtes de médicaments.
- Pilldroid a besoin de pouvoir vous envoyer des alarmes.
- Pilldroid a besoin de faire vibrer le téléphone pour les alarmes.
## L'application Pilldroid embarque-t-elle des bibliothèques tierce ?
Oui. Pour la lecture de code barre, Pilldroid utilise le projet
Oui. Pour la lecture de code-barres, Pilldroid utilise le projet
[zxing](https://github.com/journeyapps/zxing-android-embedded) lui-même libre et
ouvert.
## L'application Pilldroid contient-elle des pisteurs ?
[NON !](https://reports.exodus-privacy.eu.org/fr/reports/234531/)
[NON !](https://reports.exodus-privacy.eu.org/fr/reports/net.foucry.pilldroid/latest/)
## D'où viennent les données de Pilldroid ?
Elles sont issues de plusieurs fichiers de l'Agence pour la Sécurité des
Médicaments, agrégés dans une base de données grâce à script Python qui sera
prochainement mis sur mon compte `github`.
Médicaments, agrégés dans une base de données grâce à script Python qui est disponible sur le dépôt [TransformMeds](https://github.com/jfoucry/TransformMeds).
## Comment peut-on participer à Pilldroid ?

View file

@ -30,21 +30,23 @@ android {
keyPassword secretProperties['signing_key_password']
}
}
compileSdk 33
compileSdk 34
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
minSdk defaultMinSdkVersion
targetSdk defaultTargetSdkVersion
versionCode 302
versionName "v0.302-beta"
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
buildFeatures {
buildConfig = true
}
buildTypes {
debug {
@ -59,7 +61,7 @@ android {
signingConfig signingConfigs.release
}
}
flavorDimensions "version"
flavorDimensions = ["version"]
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
@ -77,7 +79,6 @@ android {
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion = "32.0.0"
namespace 'net.foucry.pilldroid'
allprojects {
@ -97,23 +98,25 @@ sourceSets {
}
}
}
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.room:room-common:2.4.3"
annotationProcessor "androidx.room:room-compiler:2.4.3"
implementation "androidx.room:room-testing:2.4.3"
implementation "androidx.room:room-rxjava3:2.4.3"
implementation "androidx.room:room-runtime:2.4.3"
implementation "androidx.room:room-common:2.6.1"
annotationProcessor "androidx.room:room-compiler:2.6.1"
implementation "androidx.room:room-testing:2.6.1"
implementation "androidx.room:room-rxjava3:2.6.1"
implementation "androidx.room:room-runtime:2.6.1"
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.core:core:1.12.0'
implementation 'de.raphaelebner:roomdatabasebackup:1.0.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
}
//coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
}

View file

@ -1,121 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
<<<<<<< HEAD
implementation 'androidx.appcompat:appcompat:1.4.1'
=======
implementation 'androidx.appcompat:appcompat:1.4.0'
>>>>>>> 5fe29e5 (Change compileSskVersion)
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,121 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
<<<<<<< HEAD
implementation 'androidx.appcompat:appcompat:1.4.1'
=======
implementation 'androidx.appcompat:appcompat:1.4.0'
>>>>>>> 5fe29e5 (Change compileSskVersion)
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,121 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
<<<<<<< HEAD
implementation 'androidx.appcompat:appcompat:1.4.1'
=======
implementation 'androidx.appcompat:appcompat:1.4.0'
>>>>>>> 5fe29e5 (Change compileSskVersion)
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,121 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
<<<<<<< HEAD
implementation 'androidx.appcompat:appcompat:1.4.1'
=======
implementation 'androidx.appcompat:appcompat:1.4.0'
>>>>>>> 5fe29e5 (Change compileSskVersion)
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 30
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 30
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 30
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 30
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.7.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,117 +0,0 @@
//noinspection GradleCompatible
apply plugin: 'com.android.application'
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
def secretProperties = new Properties()
if (secretsPropertiesFile.exists()) {
secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
secretProperties.setProperty("signing_keystore_password", "${System.getenv('signing_keystore_password')}")
secretProperties.setProperty("signing_key_password", "${System.getenv('signing_key_password')}")
secretProperties.setProperty("signing_key_alias", "${System.getenv('signing_key_alias')}")
}
android {
signingConfigs {
release {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_release_alias_key']
keyPassword secretProperties['signing_release_key_password']
}
prerelease {
storeFile rootProject.file("android-signing-keystore.jks")
storePassword secretProperties['signing_keystore_password']
keyAlias secretProperties['signing_pre-release_key_alias']
keyPassword secretProperties['signing_pre-release_key_password']
}
}
compileSdkVersion 31
defaultConfig {
applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion
versionCode 100
versionName "v0.100-beta"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.release
}
prerelease {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.prerelease
}
}
flavorDimensions "version"
productFlavors {
dev {
resValue "string", "app_name", "PillDroid dev"
dimension ="version"
}
product {
resValue "string", "app_name", "PillDroid"
dimension ="version"
}
preproduct {
resValue "string", "app_name", "PillDroid Pre-Release"
dimension ="version"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
buildToolsVersion '32.0.0'
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
exclude 'net/foucry/pilldroid/scanActivity.java'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.core:core:1.6.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

View file

@ -1,20 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "net.foucry.pilldroid",
"variantName": "preproductPrerelease",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 24065,
"versionName": "0.65.20220101-d04e132",
"outputFile": "app-preproduct-prerelease.apk"
}
],
"elementType": "File"
}

View file

@ -1,14 +0,0 @@
package net.foucry.pilldroid;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}

View file

@ -12,7 +12,6 @@
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
<uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
@ -69,5 +68,4 @@
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
</application>
</manifest>
</manifest>

View file

@ -12,11 +12,12 @@
p.red {
color: #ff2600;
}</style>
<title>About</title>
</head>
<body>
<center><img src="file:///android_asset/icon_pilldroid.png" width="64"/></center>
<div style="text-align: center;"><img src="file:///android_asset/icon_pilldroid.png" width="64"/></div>
<!--<div class="build">[[[about_string]]]</div>-->
<h5>Pilldroid &copy;&nbsp;2022 Jacques Foucry </h5>
<h5>Pilldroid &copy;&nbsp;2024 Jacques Foucry </h5>
<p>Pilldroid est une gestion théorique de votre stock de médicaments.</p>
<p>Pilldroid n'a aucune connaissance des interactions des médicaments entre eux.</p>
<p class="red">EN CAS DE DOUTE, CONSULTEZ VOTRE MÉDECIN OU VOTRE PHARMACIEN.</p>

View file

@ -1,6 +1,5 @@
package net.foucry.pilldroid;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
@ -11,8 +10,7 @@ import android.widget.ImageButton;
import androidx.annotation.NonNull;
import com.journeyapps.barcodescanner.BarcodeCallback;
import com.journeyapps.barcodescanner.BarcodeResult;
import androidx.appcompat.app.AppCompatActivity;
import com.journeyapps.barcodescanner.CaptureManager;
import com.journeyapps.barcodescanner.DecoratedBarcodeView;
import com.journeyapps.barcodescanner.ViewfinderView;
@ -20,7 +18,7 @@ import com.journeyapps.barcodescanner.ViewfinderView;
/**
* Custom Scanner Activity extending from Activity to display a custom layout form scanner view.
*/
public class CustomScannerActivity extends Activity implements DecoratedBarcodeView.TorchListener {
public class CustomScannerActivity extends AppCompatActivity implements DecoratedBarcodeView.TorchListener {
private static final String TAG = CustomScannerActivity.class.getName();
final Bundle captureIntentBundle = new Bundle();
@ -57,19 +55,16 @@ public class CustomScannerActivity extends Activity implements DecoratedBarcodeV
//changeMaskColor(null);
changeLaserVisibility(true);
barcodeScannerView.decodeSingle(new BarcodeCallback() {
@Override
public void barcodeResult(BarcodeResult result) {
Intent scanResult = new Intent();
//Bundle scanResultBundle = new Bundle();
scanResult.putExtra("Barcode Content", result.getText());
scanResult.putExtra("Barcode Format name", result.getBarcodeFormat().name());
scanResult.putExtra("returnCode", captureIntentBundle.getInt("returnCode"));
scanResult.putExtra("resultCode", 1);
CustomScannerActivity.this.setResult(RESULT_OK, scanResult);
Log.d(TAG, "scanResult == " + scanResult);
finish();
}
barcodeScannerView.decodeSingle(result -> {
Intent scanResult = new Intent();
//Bundle scanResultBundle = new Bundle();
scanResult.putExtra("Barcode Content", result.getText());
scanResult.putExtra("Barcode Format name", result.getBarcodeFormat().name());
scanResult.putExtra("returnCode", captureIntentBundle.getInt("returnCode"));
scanResult.putExtra("resultCode", 1);
CustomScannerActivity.this.setResult(RESULT_OK, scanResult);
Log.d(TAG, "scanResult == " + scanResult);
finish();
});
}
@ -91,6 +86,11 @@ public class CustomScannerActivity extends Activity implements DecoratedBarcodeV
capture.onDestroy();
}
@Override
public void onBackPressed(){
onCancel(this.getCurrentFocus());
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);

View file

@ -10,7 +10,6 @@ import android.text.format.DateUtils;
import android.util.Log;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
/**
@ -270,14 +269,11 @@ class DBHelper extends SQLiteOpenHelper {
Log.d(TAG, "Before sort == " + drugs);
drugs.sort(new Comparator<Drug>() {
@Override
public int compare(Drug lhs, Drug rhs) {
if (lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock()) != 0)
return lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock());
else
return (int) (lhs.getStock() - rhs.getStock());
}
drugs.sort((lhs, rhs) -> {
if (lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock()) != 0)
return lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock());
else
return (int) (lhs.getStock() - rhs.getStock());
});
Log.d(TAG, "After sort " + drugs);

View file

@ -1,20 +1,17 @@
package net.foucry.pilldroid;
import static net.foucry.pilldroid.R.id.detail_toolbar;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import net.foucry.pilldroid.dao.PrescriptionsDAO;
import net.foucry.pilldroid.databases.PrescriptionDatabase;
import net.foucry.pilldroid.models.Prescription;
@ -43,23 +40,20 @@ public class DrugDetailActivity extends AppCompatActivity {
Log.d(TAG, "aPrescription == " + aPrescription);
setContentView(R.layout.drug_detail_activity);
Toolbar toolbar = findViewById(detail_toolbar);
MaterialToolbar toolbar = findViewById(R.id.toolbar);
if (toolbar != null) {
setSupportActionBar(toolbar);
}
ImageButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Log.d(TAG, "Click on save icon");
ExtendedFloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(v -> {
Log.d(TAG, "Click on save icon");
getDrugChanges();
setResult(1);
finish();
overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right);
}
getDrugChanges();
setResult(1);
finish();
overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right);
});
// Show the Up button in the action bar.

View file

@ -5,12 +5,11 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textview.MaterialTextView;
import net.foucry.pilldroid.models.Prescription;
/**
@ -52,7 +51,7 @@ public class DrugDetailFragment extends Fragment {
Activity activity = this.getActivity();
assert activity != null;
CollapsingToolbarLayout appBarLayout = activity.findViewById(R.id.toolbar_layout);
MaterialToolbar appBarLayout = activity.findViewById(R.id.toolbar);
if (appBarLayout != null) {
appBarLayout.setTitle(prescription.getName());
}
@ -74,34 +73,34 @@ public class DrugDetailFragment extends Fragment {
if (prescription != null) {
// Find each component of rootView
nameView = detailView.findViewById(R.id.name_cell);
TextView nameLabel = nameView.findViewById(R.id.label);
TextView nameValue = nameView.findViewById(R.id.value);
MaterialTextView nameLabel = nameView.findViewById(R.id.label);
MaterialTextView nameValue = nameView.findViewById(R.id.value);
nameLabel.setText(R.string.drug_name_label);
nameValue.setText(prescription.getName());
presentationView = detailView.findViewById(R.id.presentation_cell);
TextView presentationLabel = presentationView.findViewById(R.id.label);
TextView presentationValue = presentationView.findViewById(R.id.value);
MaterialTextView presentationLabel = presentationView.findViewById(R.id.label);
MaterialTextView presentationValue = presentationView.findViewById(R.id.value);
presentationLabel.setText(R.string.drug_presentation_label);
presentationValue.setText(prescription.getPresentation());
adminModeView = detailView.findViewById(R.id.administration_cell);
TextView adminModeLabel = adminModeView.findViewById(R.id.label);
TextView adminModeValue = adminModeView.findViewById(R.id.value);
MaterialTextView adminModeLabel = adminModeView.findViewById(R.id.label);
MaterialTextView adminModeValue = adminModeView.findViewById(R.id.value);
adminModeLabel.setText(R.string.drug_administrationMode_label);
adminModeValue.setText(prescription.getAdministration_mode());
stockView = detailView.findViewById(R.id.stock_cell);
TextView stockLibelle = (stockView.findViewById(R.id.label));
TextView stockValue = stockView.findViewById(R.id.value);
MaterialTextView stockLibelle = (stockView.findViewById(R.id.label));
TextInputEditText stockValue = stockView.findViewById(R.id.value);
stockLibelle.setText(R.string.drug_current_stock_label);
stockValue.setText(Utils.fmt(prescription.getStock()));
stockValue.setHint(R.string.drug_current_stock_label);
stockValue.setSelectAllOnFocus(true);
takeView = detailView.findViewById(R.id.take_cell);
TextView takeLabel = takeView.findViewById(R.id.label);
TextView takeValue = (takeView.findViewById(R.id.value));
MaterialTextView takeLabel = takeView.findViewById(R.id.label);
TextInputEditText takeValue = (takeView.findViewById(R.id.value));
takeLabel.setText(R.string.drug_take_label);
//takeValue.setText(Double.toString(prescription.getTake()));
takeValue.setText(Utils.fmt(prescription.getTake()));
@ -109,8 +108,8 @@ public class DrugDetailFragment extends Fragment {
takeValue.setSelectAllOnFocus(true);
warningView = detailView.findViewById(R.id.warning_cell);
TextView warningLibelle = warningView.findViewById(R.id.label);
TextView warningValue = warningView.findViewById(R.id.value);
MaterialTextView warningLibelle = warningView.findViewById(R.id.label);
TextInputEditText warningValue = warningView.findViewById(R.id.value);
warningLibelle.setText(R.string.drug_warningThreshold_label);
//warningValue.setText(Integer.toString(prescription.getWarnThreshold()));
warningValue.setText(Utils.fmt(prescription.getWarning()));
@ -118,8 +117,8 @@ public class DrugDetailFragment extends Fragment {
warningValue.setSelectAllOnFocus(true);
alertView = detailView.findViewById(R.id.alert_cell);
TextView alertLibelle = alertView.findViewById(R.id.label);
TextView alertValue = alertView.findViewById(R.id.value);
MaterialTextView alertLibelle = alertView.findViewById(R.id.label);
TextInputEditText alertValue = alertView.findViewById(R.id.value);
alertLibelle.setText(R.string.drug_alertThreshold_label);
//alertValue.setText(Integer.toString(prescription.getAlertThreshold()));
alertValue.setText(Utils.fmt(prescription.getAlert()));

View file

@ -59,6 +59,9 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
;
/**
* An activity representing a list of Drugs is activity
@ -75,6 +78,8 @@ public class DrugListActivity extends AppCompatActivity {
public final String BARCODE_CONTENT = "Barcode Content";
// Used for dev and debug
final Boolean DEMO = false;
final private boolean enableLog = true;
final private boolean encryptBackup = true;
public PrescriptionDatabase prescriptions;
public MedicineDatabase medicines;
private ActivityResultLauncher<ScanOptions> mBarcodeScannerLauncher;
@ -107,31 +112,32 @@ public class DrugListActivity extends AppCompatActivity {
// Manually migrate old database to room
PrescriptionsDAO prescriptionsDAO = prescriptions.getPrescriptionsDAO();
DBHelper dbHelper = new DBHelper(this);
if (dbHelper.getCount() != 0) {
List<Drug> drugs = dbHelper.getAllDrugs();
for (int count = 0; count < dbHelper.getCount(); count++) {
Drug drug = drugs.get(count);
Prescription prescription = new Prescription();
try (DBHelper dbHelper = new DBHelper(this)) {
if (dbHelper.getCount() != 0) {
List<Drug> drugs = dbHelper.getAllDrugs();
for (int count = 0; count < dbHelper.getCount(); count++) {
Drug drug = drugs.get(count);
Prescription prescription = new Prescription();
if (prescriptionsDAO.getMedicByCIP13(drug.getCip13()) == null) {
prescription.setName(drug.getName());
prescription.setCip13(drug.getCip13());
prescription.setCis(drug.getCis());
prescription.setPresentation(drug.getPresentation());
prescription.setAdministration_mode(drug.getAdministration_mode());
prescription.setStock((float) drug.getStock());
prescription.setTake((float) drug.getTake());
prescription.setWarning(drug.getWarnThreshold());
prescription.setAlert(drug.getAlertThreshold());
prescription.setLast_update(drug.getDateLastUpdate());
if (prescriptionsDAO.getMedicByCIP13(drug.getCip13()) == null) {
prescription.setName(drug.getName());
prescription.setCip13(drug.getCip13());
prescription.setCis(drug.getCis());
prescription.setPresentation(drug.getPresentation());
prescription.setAdministration_mode(drug.getAdministration_mode());
prescription.setStock((float) drug.getStock());
prescription.setTake((float) drug.getTake());
prescription.setWarning(drug.getWarnThreshold());
prescription.setAlert(drug.getAlertThreshold());
prescription.setLast_update(drug.getDateLastUpdate());
prescriptionsDAO.insert(prescription);
} else {
Log.i(TAG, "Already in the database");
prescriptionsDAO.insert(prescription);
} else {
Log.i(TAG, "Already in the database");
}
}
dbHelper.dropDrug();
}
dbHelper.dropDrug();
}
// remove old notification
Log.d(TAG, "Remove old notification and old job");
@ -222,6 +228,7 @@ public class DrugListActivity extends AppCompatActivity {
Log.d(TAG, "Missing camera permission");
Toast.makeText(this, R.string.missing_camera_permission, Toast.LENGTH_LONG).show();
} else {
assert bundle != null;
Log.d(TAG, "bundle == " + bundle.getInt("returnCode"));
int returnCode = bundle.getInt("returnCode");
int resultCode = bundle.getInt("resultCode");
@ -245,13 +252,13 @@ public class DrugListActivity extends AppCompatActivity {
}
String cip13;
switch (bundle.getString(BARCODE_FORMAT_NAME)) {
switch (Objects.requireNonNull(bundle.getString(BARCODE_FORMAT_NAME))) {
case "CODE_128":
case "EAN_13": //CODE_128 || EAN 13
cip13 = bundle.getString(BARCODE_CONTENT);
break;
case "DATA_MATRIX":
cip13 = bundle.getString(BARCODE_CONTENT).substring(4, 17);
cip13 = Objects.requireNonNull(bundle.getString(BARCODE_CONTENT)).substring(4, 17);
break;
default:
scanNotOK();
@ -300,6 +307,11 @@ public class DrugListActivity extends AppCompatActivity {
startActivity(new Intent(this, WelcomeActivity.class));
return true;
} else if (id == R.id.export_prescription) {
//backupPrescriptions();
// TODO: a changer ainsi que le menu.
} else if (id == R.id.import_prescription) {
//restorePrescriptions();
}
return super.onOptionsItemSelected(item);
}
@ -338,7 +350,7 @@ public class DrugListActivity extends AppCompatActivity {
protected void showInputDialog() {
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Objects.requireNonNull(dialog.getWindow()).setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
@ -348,11 +360,9 @@ public class DrugListActivity extends AppCompatActivity {
Button cancel = dialog.findViewById(R.id.notagreed);
ok.setEnabled(false);
//TextView title = (TextView ) dialog.findViewById(R.id.title);
final EditText editText=(EditText)dialog.findViewById(R.id.editcip13);
final EditText editText = dialog.findViewById(R.id.editcip13);
String cip13 = String.valueOf(editText.getText());
// TODO change the color of ok button when the number of character is correct.
ok.setText(R.string.button_ok);
cancel.setText(R.string.button_cancel);
editText.addTextChangedListener(new TextWatcher() {
@ -370,21 +380,16 @@ public class DrugListActivity extends AppCompatActivity {
ok.setEnabled(s.length() == 8);
}
});
ok.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
dialog.cancel();
Log.i("EditText Value",editText.getEditableText().toString());
MedicinesDAO medicinesDAO = medicines.getMedicinesDAO();
Medicine aMedicine = medicinesDAO.getMedicineByCIP13(cip13);
askToAddInDB(aMedicine);
}
ok.setOnClickListener(v -> {
dialog.cancel();
Log.i("EditText Value", editText.getEditableText().toString());
MedicinesDAO medicinesDAO = medicines.getMedicinesDAO();
Medicine aMedicine = medicinesDAO.getMedicineByCIP13(cip13);
askToAddInDB(aMedicine);
});
cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.cancel();
Log.i(TAG, "dismiss dialog");
}
cancel.setOnClickListener(v -> {
dialog.cancel();
Log.i(TAG, "dismiss dialog");
});
dialog.show();
@ -399,7 +404,7 @@ public class DrugListActivity extends AppCompatActivity {
private void askToAddInDB(Medicine aMedicine) {
final Dialog dlg = new Dialog(this);
dlg.requestWindowFeature(Window.FEATURE_NO_TITLE);
dlg.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
Objects.requireNonNull(dlg.getWindow()).setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dlg.setContentView(R.layout.custom_dialog_layout_one_button);
dlg.setCancelable(false);
TextView msg = dlg.findViewById(R.id.msg);
@ -414,31 +419,23 @@ public class DrugListActivity extends AppCompatActivity {
msgString = aMedicine.getName() + " " + getString(R.string.msgFound);
msg.setText(msgString);
cplString = getString(R.string.addInList);
if (cplString.equals("")) {
if (cplString.isEmpty()) {
cpl.setEnabled(false);
}
icon.setImageResource(R.drawable.tickmark);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
dlg.dismiss();
finish();
addDrugToList(Utils.medicine2prescription(aMedicine));
}
btn.setOnClickListener(v -> {
dlg.dismiss();
finish();
addDrugToList(Utils.medicine2prescription(aMedicine));
});
} else {
msgString = getString(R.string.msgNotFound);
msg.setText(msgString);
cpl.setText("");
icon.setImageResource(R.drawable.tickcross); //TODO: Exception imageResource null Object reference
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
dlg.dismiss();
finish();
}
btn.setOnClickListener(v -> {
dlg.dismiss();
finish();
});
}
dlg.show();
@ -516,12 +513,9 @@ public class DrugListActivity extends AppCompatActivity {
}
Snackbar.make(recyclerView, prescription.getName(),
Snackbar.LENGTH_LONG).setAction(R.string.Undo, new View.OnClickListener() {
@Override
public void onClick(View v) {
prescriptionList.add(position, prescription);
mAdapter.notifyItemInserted(position);
}
Snackbar.LENGTH_LONG).setAction(R.string.Undo, v -> {
prescriptionList.add(position, prescription);
mAdapter.notifyItemInserted(position);
}).show();
}
@ -649,17 +643,14 @@ public class DrugListActivity extends AppCompatActivity {
holder.mView.setBackgroundResource(R.drawable.gradient_bg);
holder.mIconView.setImageResource(R.drawable.ic_suspended_pill);
holder.mView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Prescription aPrescription = mValues.get(position);
Context context = v.getContext();
Intent intent = new Intent(context, DrugDetailActivity.class);
intent.putExtra("prescription", aPrescription);
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
holder.mView.setOnClickListener(v -> {
Prescription aPrescription = mValues.get(position);
Context context = v.getContext();
Intent intent = new Intent(context, DrugDetailActivity.class);
intent.putExtra("prescription", aPrescription);
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
}
});
} else {
int remainingStock = (int) Math.floor(mValues.get(position).getStock() / mValues.get(position).getTake());
@ -675,16 +666,13 @@ public class DrugListActivity extends AppCompatActivity {
holder.mIconView.setImageResource(R.drawable.ok_stock_vect);
}
holder.mView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Prescription prescription = mValues.get(position);
Context context = v.getContext();
Intent intent = new Intent(context, DrugDetailActivity.class);
intent.putExtra("prescription", prescription);
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
}
holder.mView.setOnClickListener(v -> {
Prescription prescription = mValues.get(position);
Context context = v.getContext();
Intent intent = new Intent(context, DrugDetailActivity.class);
intent.putExtra("prescription", prescription);
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
});
}
}

View file

@ -3,7 +3,6 @@ package net.foucry.pilldroid;
import net.foucry.pilldroid.models.Medicine;
import net.foucry.pilldroid.models.Prescription;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Locale;
@ -49,15 +48,11 @@ public class Utils {
}
public static void sortPrescriptionList(List<Prescription> prescriptionList) {
prescriptionList.sort(new Comparator<>() {
@Override
public int compare(Prescription lhs, Prescription rhs) {
if (lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock()) != 0)
return lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock());
else
return (int) (lhs.getStock() - rhs.getStock());
}
prescriptionList.sort((lhs, rhs) -> {
if (lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock()) != 0)
return lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock());
else
return (int) (lhs.getStock() - rhs.getStock());
});
}
}
}

View file

@ -13,23 +13,23 @@ import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowInsetsController;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.imageview.ShapeableImageView;
import com.google.android.material.textview.MaterialTextView;
public class WelcomeActivity extends AppCompatActivity {
private ViewPager viewPager;
private LinearLayout dotsLayout;
private int[] layouts;
private Button btnSkip, btnNext;
private MaterialButton btnSkip, btnNext;
// viewpager change listener
final ViewPager.OnPageChangeListener viewPagerPageChangeListener = new ViewPager.OnPageChangeListener() {
@ -141,37 +141,30 @@ public class WelcomeActivity extends AppCompatActivity {
dlg.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dlg.setContentView(R.layout.custom_dialog_layout_one_button);
dlg.setCancelable(false);
TextView msg = dlg.findViewById(R.id.msg);
MaterialTextView msg = dlg.findViewById(R.id.msg);
String msgString;
TextView cpl = dlg.findViewById(R.id.cpl);
String cplString = "";
ImageView icon = dlg.findViewById(R.id.image);
Button btn = dlg.findViewById(R.id.txtClose);
MaterialTextView cpl = dlg.findViewById(R.id.cpl);
ShapeableImageView icon = dlg.findViewById(R.id.image);
MaterialButton btn = dlg.findViewById(R.id.txtClose);
dlg.show();
msgString = getString(R.string.understood);
msg.setText(msgString);
if (cplString.equals("")) {
cpl.setEnabled(false);
}
cpl.setVisibility(View.GONE);
//icon.setImageResource(R.drawable.pilldroid_icon);
btn.setText(R.string.Yes);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
dlg.dismiss();
finish();
}
btn.setText(R.string.Yes_understood);
btn.setOnClickListener(v -> {
// TODO Auto-generated method stub
dlg.dismiss();
});
}
private void addBottomDots(int currentPage) {
TextView[] dots = new TextView[layouts.length];
MaterialTextView[] dots = new MaterialTextView[layouts.length];
dotsLayout.removeAllViews();
for (int i = 0; i < dots.length; i++) {
dots[i] = new TextView(this);
dots[i] = new MaterialTextView(this);
dots[i].setText("");
dots[i].setTextSize(65);
dots[i].setTextColor(ContextCompat.getColor(this, R.color.dot_dark));
@ -201,6 +194,7 @@ public class WelcomeActivity extends AppCompatActivity {
window.setStatusBarColor(Color.TRANSPARENT);
}
@SuppressWarnings("deprecation")
private void setFullScreen() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
getWindow().setDecorFitsSystemWindows(false);
@ -210,7 +204,6 @@ public class WelcomeActivity extends AppCompatActivity {
controller.setSystemBarsBehavior(WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);
}
} else {
//noinspection
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M313,520L537,744L480,800L160,480L480,160L537,216L313,440L800,440L800,520L313,520Z"/>
</vector>

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/white"
android:pathData="M440,520L200,520L200,440L440,440L440,200L520,200L520,440L760,440L760,520L520,520L520,760L440,760L440,520Z"/>
</vector>

View file

@ -1,4 +1,4 @@
<vector android:height="60dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
<path android:fillColor="#FFFFFF" android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
</vector>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/grey" />
<corners android:bottomRightRadius="24dp"
android:bottomLeftRadius="24dp"
android:topRightRadius="24dp"
android:topLeftRadius="24dp"/>
</shape>

View file

@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:baselineAligned="false"
android:divider="?android:attr/dividerHorizontal"
android:orientation="horizontal"
@ -23,8 +23,8 @@
android:name="net.foucry.pilldroid.MedicamentListFragment"
android:layout_width="@dimen/item_width"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:layoutManager="LinearLayoutManager"
tools:context="net.foucry.pilldroid.DrugListActivity"
tools:listitem="@layout/drug_list_content" />

View file

@ -1,11 +1,22 @@
<?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:background="@android:color/white"
android:orientation="vertical"
tools:ignore="Overdraw">
<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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/white"
android:orientation="vertical"
tools:ignore="Overdraw">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_collapseMode="pin"
app:titleTextColor="@color/white"
app:title="@string/about"/>
<WebView
android:id="@+id/aboutHtml"

View file

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/cl_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp"
tools:ignore="HardcodedText"
tools:context=".DrugListActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/btn_addFruit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="32dp"
android:src="@drawable/ic_add"
android:contentDescription="Add new Fruit" />
<LinearLayout
android:id="@+id/ll_properties"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="160dp"
android:orientation="vertical"
android:padding="16dp"
app:layout_anchor="@+id/constraintLayout"
app:layout_anchorGravity="center">
<RadioGroup
android:id="@+id/radio_select"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<RadioButton
android:id="@+id/backup_btn"
android:layout_width="194dp"
android:layout_height="wrap_content"
android:text="@string/export_prescriptions"/>
<RadioButton
android:id="@+id/restore_btn"
android:layout_width="194dp"
android:layout_height="wrap_content"
android:text="@string/import_prescriptions" />
</RadioGroup>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/btn_backup_location"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:background="@drawable/rounded_btn"
android:text="Backup Location"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="@android:color/white" />
<Button
android:id="@+id/btn_properties"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_weight="1"
android:background="@drawable/rounded_btn"
android:text="Properties"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -8,7 +8,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:zxing_framing_rect_height="150dp"
app:zxing_framing_rect_width="300dp"></com.journeyapps.barcodescanner.BarcodeView>
app:zxing_framing_rect_width="300dp"/>
<com.journeyapps.barcodescanner.ViewfinderView
android:id="@+id/zxing_viewfinder_view"
@ -21,7 +21,7 @@
app:zxing_viewfinder_laser_visibility="true"
app:zxing_viewfinder_mask="@color/grey" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/zxing_status_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -29,7 +29,9 @@
android:layout_marginTop="@dimen/app_bar_height"
android:background="@color/zxing_transparent"
android:fontFamily="sans-serif-black"
android:text="@string/zxing_msg_default_status"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:text="@string/scan_label"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="32sp"
@ -42,13 +44,11 @@
android:layout_gravity="bottom|start"
android:layout_margin="@dimen/fab_margin"
android:accessibilityHeading="true"
android:backgroundTint="@android:color/transparent"
android:clickable="false"
app:backgroundTint="@android:color/transparent"
android:contentDescription="@string/button_cancel"
android:cropToPadding="false"
android:foregroundTint="@android:color/darker_gray"
android:onClick="onCancel"
android:src="@drawable/ic_cancel_black_24dp" />
app:background="@android:color/darker_gray"
app:srcCompat="@drawable/ic_cancel_black_24dp" />
<ImageButton
android:id="@+id/keyboard_button"
@ -56,10 +56,9 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:backgroundTint="@android:color/transparent"
app:backgroundTint="@android:color/transparent"
android:contentDescription="@string/button_keyboard"
android:onClick="onKeyboard"
android:src="@drawable/ic_keyboard_black_24dp"
app:srcCompat="@drawable/ic_keyboard_black_24dp"
tools:ignore="PrivateResource" />
</merge>

View file

@ -4,7 +4,7 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/custom_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -7,15 +7,15 @@
android:layout_height="match_parent"
tools:ignore="MissingDefaultResource">
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
app:cardCornerRadius="11dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
@ -23,43 +23,44 @@
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image"
android:layout_width="61dp"
android:layout_height="61dp"
android:layout_gravity="center"
android:layout_marginTop="12dp"
android:src="@drawable/ic_launcher_foreground"
app:srcCompat="@drawable/ic_launcher_foreground"
android:background="@drawable/shadow_bg"
tools:ignore="ContentDescription"/>
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@id/msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginStart="22dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:fontFamily="@font/opensans_semibold"
android:text="@string/app_name"
android:textColor="@color/grey"
android:textSize="15dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage"/>
tools:ignore="HardcodedText,SpUsage"/>
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@id/cpl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginStart="22dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:fontFamily="@font/opensans_regular"
android:text="@string/app_version"
android:textColor="#757575"
android:textSize="14dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
tools:ignore="HardcodedText,SpUsage" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/txtClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -73,14 +74,14 @@
android:background="@drawable/rounded_btn"
android:gravity="center"
android:maxLines="1"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:text="Close"
android:textColor="#212121"
android:paddingStart="25dp"
android:paddingEnd="25dp"
android:text="@string/button_close"
android:textColor="@color/white"
android:textSize="16sp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
tools:ignore="HardcodedText,SpUsage" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -7,15 +7,15 @@
android:layout_height="match_parent"
tools:ignore="MissingDefaultResource">
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
app:cardCornerRadius="11dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
@ -23,40 +23,40 @@
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="61dp"
android:layout_height="61dp"
android:layout_gravity="center"
android:layout_marginTop="12dp"
android:background="@drawable/shadow_bg"
android:src="@drawable/ic_launcher_foreground" />
app:srcCompat="@drawable/ic_launcher_foreground" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@id/msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginStart="22dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:fontFamily="@font/opensans_semibold"
android:text="@string/app_name"
android:textColor="@color/grey"
android:textSize="15dp"
android:labelFor="@+id/msg"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
tools:ignore="HardcodedText,SpUsage" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@id/cpl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginStart="22dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:fontFamily="@font/opensans_regular"
android:text="@string/app_version"
android:textColor="@color/grey"
android:textSize="14dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
tools:ignore="HardcodedText,SpUsage" />
</LinearLayout>
<LinearLayout
@ -64,7 +64,24 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/notagreed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="170dp"
android:layout_marginStart="30dp"
android:layout_marginBottom="38dp"
android:background="@drawable/rounded_btn"
android:text="@string/button_cancel"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="16sp" />
<Space
android:layout_width="100dp"
android:layout_height="wrap_content" />
<com.google.android.material.button.MaterialButton
android:id="@+id/agreed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -74,25 +91,9 @@
android:background="@drawable/rounded_btn"
android:text="@string/button_ok"
android:textAlignment="center"
android:textColor="#212121"
android:textColor="@color/white"
android:textSize="16sp" />
<Space
android:layout_width="155dp"
android:layout_height="wrap_content" />
<Button
android:id="@+id/notagreed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="170dp"
android:layout_marginEnd="30dp"
android:layout_marginBottom="38dp"
android:background="@drawable/rounded_btn"
android:text="@string/button_cancel"
android:textAlignment="center"
android:textColor="#212121"
android:textSize="16sp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -21,10 +21,9 @@
android:layout_marginTop="@dimen/fab_margin"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginBottom="@dimen/fab_margin"
android:backgroundTint="@android:color/transparent"
app:backgroundTint="@android:color/transparent"
android:contentDescription="@string/flashlightButton"
android:onClick="switchFlashlight"
android:src="@drawable/ic_baseline_highlight_24" />
app:srcCompat="@drawable/ic_baseline_highlight_24" />
</com.journeyapps.barcodescanner.DecoratedBarcodeView>
</RelativeLayout>

View file

@ -12,27 +12,25 @@
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
android:background="@color/ic_launcher_background"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="25dp"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:toolbarId="@+id/detail_toolbar" />
app:contentScrim="#0000"
app:layout_scrollFlags="scroll|exitUntilCollapsed" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/detail_toolbar"
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</com.google.android.material.appbar.AppBarLayout>
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextColor="@color/white"/>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/drug_detail_container"
@ -43,15 +41,18 @@
</androidx.core.widget.NestedScrollView>
<ImageButton
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/fab"
android:layout_width="@dimen/fab_width"
android:layout_height="@dimen/fab_height"
android:layout_gravity="end|bottom"
android:layout_marginTop="?attr/actionBarSize"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginBottom="?attr/actionBarSize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:fabSize="normal"
android:layout_gravity="center|bottom"
android:scaleType="center"
android:layout_margin="@dimen/fab_margin"
android:contentDescription="@string/save_button"
android:src="@drawable/ic_save_black_24dp"
app:backgroundTint="@android:color/transparent" />
android:text="@string/save_button"
android:textColor="@color/white"
app:icon="@drawable/ic_save_black_24dp"
app:backgroundTint="@color/colorPrimary"
app:iconTint="@color/white"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -13,11 +13,14 @@
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
app:popupTheme="@style/AppTheme.PopupOverlay" />
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextColor="@color/white"/>
</com.google.android.material.appbar.AppBarLayout>
@ -25,7 +28,7 @@
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
android:layout_marginTop="?attr/actionBarSize">
<include
layout="@layout/drug_list"
@ -36,20 +39,13 @@
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:accessibilityHeading="true"
android:adjustViewBounds="true"
android:backgroundTint="@android:color/transparent"
android:baselineAlignBottom="false"
android:clickable="false"
android:contentDescription="@string/add_button"
android:onClick="onButtonClick"
android:src="@drawable/ic_add_circle_black_24dp"
app:backgroundTint="@android:color/darker_gray"
app:fabCustomSize="60dp"
app:maxImageSize="60dp"
tools:ignore="OnClick" />
app:srcCompat="@drawable/ic_add"
app:backgroundTint="@color/colorPrimary"
app:tint="@color/white"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:orientation="horizontal">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="80dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal">
<!-- Drug's name-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/list_image"
android:layout_width="50sp"
android:layout_height="50sp"
@ -17,9 +19,9 @@
android:layout_centerVertical="true"
android:layout_marginStart="5dp"
android:contentDescription="@string/stockIcon"
android:src="@drawable/ok_stock_vect" />
app:srcCompat="@drawable/ok_stock_vect" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -32,7 +34,7 @@
android:textStyle="bold"
android:typeface="sans" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/endOfStock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -52,13 +54,13 @@
<!-- dateEndOfStock -->
<!-- Rightend Arrow -->
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="10sp"
android:contentDescription="@string/detail_view"
android:src="@drawable/ic_navigate_next_black_24dp" />
app:srcCompat="@drawable/ic_navigate_next_black_24dp" />
</RelativeLayout>

View file

@ -2,10 +2,10 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/list_selector"
android:background="@color/white"
android:orientation="vertical">
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -17,7 +17,7 @@
android:textSize="16sp"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -30,5 +30,10 @@
android:text="@string/label"
android:textColor="#0c4758"
android:textStyle="italic" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
android:layout_below="@id/label"/>
</RelativeLayout>

View file

@ -18,7 +18,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/notagreed"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
@ -29,14 +29,14 @@
android:gravity="center"
android:maxLines="1"
android:minWidth="100dp"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:paddingStart="25dp"
android:paddingEnd="25dp"
android:text="@string/button_cancel"
android:textColor="#212121"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
tools:ignore="HardcodedText,SpUsage" />
<Space
android:id="@+id/space"
@ -46,7 +46,7 @@
app:layout_constraintEnd_toStartOf="@+id/agreed"
app:layout_constraintStart_toEndOf="@+id/notagreed" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/agreed"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
@ -56,8 +56,8 @@
android:gravity="center"
android:maxLines="1"
android:minWidth="100dp"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:paddingStart="25dp"
android:paddingEnd="25dp"
android:text="@string/button_ok"
android:textColor="#212121"
android:textSize="16sp"
@ -65,7 +65,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/notagreed"
app:layout_constraintVertical_bias="0.0"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
tools:ignore="HardcodedText,SpUsage" />
<EditText
android:id="@+id/editcip13"
@ -84,7 +84,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.416" />
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/imageView"
android:layout_width="60dp"
android:layout_height="60dp"
@ -97,7 +97,7 @@
app:layout_constraintVertical_bias="0.0"
app:srcCompat="@drawable/ic_launcher_foreground" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/textView4"
android:layout_width="55dp"
android:layout_height="33dp"

View file

@ -1,45 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/list_selector"
android:orientation="horizontal"
android:padding="10dp"
android:weightSum="1">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="10dp"
android:weightSum="1">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/inputLayout"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_toStartOf="@id/inputLayout"
android:gravity="center_vertical"
android:paddingStart="5dp"
android:paddingEnd="25dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#040404"
android:textStyle="bold" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/inputLayout"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/value"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_toStartOf="@id/value"
android:gravity="center_vertical"
android:paddingStart="5dp"
android:paddingEnd="25dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#040404"
android:textStyle="bold" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:gravity="end|fill_vertical"
<EditText
android:id="@+id/value"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:ems="10"
android:gravity="end|fill_vertical"
android:hint="@string/zero"
android:importantForAutofill="no"
android:inputType="numberDecimal"
android:labelFor="@id/value"
android:paddingStart="5dp"
android:paddingEnd="25dp"
android:textAlignment="gravity"
android:textColorHint="@color/grey"
tools:ignore="LabelFor" />
android:importantForAutofill="no"
android:inputType="numberDecimal"
android:labelFor="@id/value"
android:paddingStart="5dp"
android:paddingEnd="25dp"
android:textAlignment="gravity"
android:textColorHint="@color/grey"
tools:ignore="LabelFor" />
</com.google.android.material.textfield.TextInputLayout>
</RelativeLayout>

View file

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen1"
android:gravity="center"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen1"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/pilldroid_icon"
android:src="@drawable/pilldroid_icon" />
app:srcCompat="@drawable/pilldroid_icon" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/slide1_Pilldroid"
@ -23,12 +23,12 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="58dp"
android:layout_marginTop="20dp"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingStart="@dimen/desc_padding"
android:paddingEnd="@dimen/desc_padding"
android:text="@string/slide1_desc"
android:textAlignment="center"
android:textColor="@android:color/white"

View file

@ -1,19 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen5"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen5"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/suspended_treatment_icon"
android:src="@drawable/ic_suspended_pill" />
app:srcCompat="@drawable/ic_suspended_pill" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"
@ -24,12 +26,12 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingStart="@dimen/desc_padding"
android:paddingEnd="@dimen/desc_padding"
android:text="@string/slide10_desc"
android:textAlignment="center"
android:textColor="@android:color/white"

View file

@ -1,19 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen3"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen3"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/save_icon"
android:src="@drawable/ic_save_black_24dp" />
app:srcCompat="@drawable/ic_save_black_24dp" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"
@ -24,12 +26,12 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingStart="@dimen/desc_padding"
android:paddingEnd="@dimen/desc_padding"
android:text="@string/slide11_desc"
android:textAlignment="center"
android:textColor="@android:color/white"

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_centerInParent="true"
@ -7,13 +8,13 @@
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/pilldroid_icon"
android:src="@drawable/pilldroid_icon" />
app:srcCompat="@drawable/pilldroid_icon" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"
@ -24,14 +25,15 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingStart="@dimen/desc_padding"
android:paddingEnd="@dimen/desc_padding"
android:text="@string/slide12_desc"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="@dimen/slide_desc" />
android:textSize="@dimen/slide_desc"
android:autoLink="web"/>
</LinearLayout>

View file

@ -1,19 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen2"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen2"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/the_plus_icon"
android:src="@drawable/ic_add_circle_black_24dp" />
<TextView
android:src="@drawable/ic_add" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"
@ -24,12 +25,12 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingStart="@dimen/desc_padding"
android:paddingEnd="@dimen/desc_padding"
android:text="@string/slide2_desc"
android:textAlignment="center"
android:textColor="@android:color/white"

View file

@ -1,19 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen3"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen3"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/barcode_icon"
android:src="@drawable/ic_barcode" />
app:srcCompat="@drawable/ic_barcode" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"
@ -24,12 +26,12 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="33dp"
android:layout_marginTop="20dp"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingStart="@dimen/desc_padding"
android:paddingEnd="@dimen/desc_padding"
android:text="@string/slide3_desc"
android:textAlignment="center"
android:textColor="@android:color/white"

View file

@ -1,18 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_screen4"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/bg_screen4"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/qr_code_icon"
android:src="@drawable/ic_qr_code" />
app:srcCompat="@drawable/ic_qr_code" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/slide4_Pilldroid"
@ -20,12 +22,12 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginTop="20dp"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingStart="@dimen/desc_padding"
android:paddingEnd="@dimen/desc_padding"
android:text="@string/slide4_desc"
android:textAlignment="center"
android:textColor="@android:color/white"

View file

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen3"
android:gravity="center"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen3"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/happy_face"
android:src="@drawable/ok_stock_vect" />
app:srcCompat="@drawable/ok_stock_vect" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"

View file

@ -1,20 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen2"
android:gravity="center"
android:orientation="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen2"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/neutral_face"
android:src="@drawable/warning_stock_vect" />
app:srcCompat="@drawable/warning_stock_vect" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"

View file

@ -1,18 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_screen4"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/bg_screen4"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/img_width_height"
android:layout_height="@dimen/img_width_height"
android:contentDescription="@string/unhappy_face"
android:src="@drawable/lower_stock_vect" />
app:srcCompat="@drawable/lower_stock_vect" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="349dp"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"

View file

@ -1,19 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen1"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen1"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/screen_shot_height"
android:layout_height="@dimen/screen_shot_height"
android:contentDescription="@string/drug_info"
android:src="@drawable/info" />
app:srcCompat="@drawable/info" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"

View file

@ -1,19 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@color/bg_screen2"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_centerInParent="true"
android:background="@color/bg_screen2"
android:gravity="center"
android:orientation="vertical">
<ImageView
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="@dimen/screen_shot_height"
android:layout_height="@dimen/screen_shot_height"
android:contentDescription="@string/tunable"
android:src="@drawable/tunable" />
app:srcCompat="@drawable/tunable" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/title_padding"

View file

@ -17,29 +17,30 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dots_height"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dots_margin_bottom"
android:layout_marginBottom="20dp"
android:gravity="center"
android:orientation="horizontal"></LinearLayout>
android:orientation="horizontal"/>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_next"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dots_margin_bottom"
android:layout_marginBottom="@dimen/button_margin_bottom"
android:background="@null"
android:text="@string/next"
android:textColor="@android:color/white"
tools:ignore="RelativeOverlap,RtlSymmetry" />
android:textColor="@android:color/white" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_skip"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dots_margin_bottom"
android:layout_marginBottom="@dimen/button_margin_bottom"
android:background="@null"
android:text="@string/skip"
android:textColor="@android:color/white" />

View file

@ -21,6 +21,8 @@
<string name="flashlightButton">Allumer/Eteindre le Flash</string>
<string name="enter_cip_13_here">Saisir la fin du code CIP 13 ici..</string>
<string name="enter_cip_13">Saisir le code CIP 13</string>
<string name="button_close">Fermer</string>
<string name="scan_label">Visez le code-barres pour le scanner</string>
<!-- Slide Strings -->
<string name="slide1_Pilldroid">Bienvenue dans Pilldroid</string>
@ -66,7 +68,8 @@
<string name="notInterpreted">Le code barre ne peut pas être interprété</string>
<string name="cancelled_scan">Scan annulé</string>
<string name="missing_camera_permission">Autorisation appareil photo manquante</string>
<string name="Yes">Oui, j\'ai compris</string>
<string name="Yes">Oui</string>
<string name="Yes_understood">Oui, j\'ai compris</string>
<string name="understood">Je comprends que le développeur de Pilldroid n\'est pas responsable de la gestion de vos médicaments. CELA RELÈVE DE VOTRE SEULE RESPONSABILITÉ.</string>
<string name="Undo">Annuler</string>
<string name="trash_icon">Icône de poubelle</string>

View file

@ -10,6 +10,7 @@
<!-- Slide dimens -->
<dimen name="dots_height">75dp</dimen>
<dimen name="dots_margin_bottom">20dp</dimen>
<dimen name="button_margin_bottom">25dp</dimen>
<dimen name="img_width_height">240dp</dimen>
<dimen name="slide_title">30sp</dimen>
<dimen name="slide_desc">16sp</dimen>

View file

@ -22,6 +22,8 @@
<string name="enter_cip_13">Enter CIP 13</string>
<string name="channel_description" translatable="false">Pilldroid_NotificationChannel</string>
<string name="channel_name" translatable="false">PilldroidChannel</string>
<string name="button_close">Close</string>
<string name="scan_label">Aim at the barcode to scan it</string>
<!-- slides strings -->
<string name="slide1_Pilldroid">Welcome on Pilldroid</string>
@ -68,7 +70,8 @@
<string name="notInterpreted">Bar code cannot be interpreted</string>
<string name="cancelled_scan">Scan canceled</string>
<string name="missing_camera_permission">Missing camera permission</string>
<string name="Yes">Yes, I understood</string>
<string name="Yes">Yes</string>
<string name="Yes_understood">Yes, I understood</string>
<string name="understood">I understood that the developer of Pilldroid cannot be responsible of your medication management. IT\'S YOU OWN RESPONSIBILITY.</string>
<string name="Undo">Undo</string>
<string name="trash_icon">Trash icon</string>

View file

@ -1,11 +1,14 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="backgroundTint">@color/white</item>
<item name="android:textColorSecondary">@android:color/white</item>
<item name="popupMenuBackground">@color/white</item>
</style>
<style name="AppTheme.NoActionBar">
@ -13,9 +16,9 @@
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.Material3.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.Material3.Light" />
<style name="MyDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<!--buttons color-->

View file

@ -17,9 +17,6 @@ buildscript {
}
ext {
compileSdkVersion = '28'
buildToolsVersion = '28.0.1'
var = '3.4.2'
//buildToolsVersion1 = '29.0.3'
defaultMinSdkVersion = 26
defaultTargetSdkVersion = 30
defaultVersionCode = 1
@ -35,9 +32,8 @@ allprojects {
}
}
task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
dependencies {
}
dependencies {}

View file

@ -1,6 +1,6 @@
# v0.300-beta - Nouvelles fonctionnalités
- La gestion de la liste des prescriptions (les médicaments que vous prenez) à été revue ;
- La gestion de la liste des prescriptions (les médicaments que vous prenez) a été revue ;
- un glissement de la droite vers la gauche supprime le médicament de la liste ET de
la base données ;
- un glissement de la gauche vers la droite permet de modifier les détails du médicament,
@ -8,9 +8,9 @@
Ces changements vont vous permettre de supprimer les médicaments dont la prise est à zéro (0)
depuis longtemps et que vous ne prendrez plus.
Ils vont également me permettre d'avancer sur la prochaine étape qui est de plus présenter les noms
Ils vont également me permettre d'avancer sur la prochaine étape qui est de plus présenté les noms
des médicaments, mais la molécule (doliprane, efferalgan, dafalgan deviendront paracétamol).
Je vous en dirais plus prochainement.
Je vous en dirai plus prochainement.
Merci de me faire des retours sur ces nouveautés, [Pilldroid](mailto:jacques+pilldroid@foucry.net)
[Pilldroid](mailto:pilldroid@foucry.net)ou pilldroid@foucry.net.

View file

@ -1,12 +1,12 @@
# V0.302-beta - bugs fix and small interface changes
- Résolution de la bogue qui empéchait la calcul dv stock et l'émission de l'alarme,
- Résolution de la bogue qui empêchait le calcul du stock et l'émission de l'alarme,
bogue qui est apparu dans la version v0.201-beta. Je suis désolé pour cette bogue et le temps
que j'ai mis à la corriger ;
- Suppression de vieux code et vieux commentaires ;
- Changement dans le dialogue de saisie d'un CIP13, vous n'avez plvs qve les 7
- Changement dans le dialogue de saisie d'un CIP13, vous n'avez plus que les 7
derniers chiffres à entrer;
- Changement dans l'apparence de la saisie des valeurs, j'ai supprimer les coins arrondis.
- Changement dans l'apparence de la saisie des valeurs, j'ai supprimé les coins arrondis.
De nombreux autres bogues restent présentes, mais je ne les ai pas encore trouvé.
@ -25,7 +25,7 @@ Merci pour votre aide et votre patience. Un petit mot fait toujours plaisir.
# v0.300-beta - Nouvelles fonctionnalités
- La gestion de la liste des prescriptions (les médicaments que vous prenez) à été revue ;
- La gestion de la liste des prescriptions (les médicaments que vous prenez) a été revue ;
- un glissement de la droite vers la gauche supprime le médicament de la liste ET de
la base données ;
- un glissement de la gauche vers la droite permet de modifier les détails du médicament,
@ -33,9 +33,9 @@ Merci pour votre aide et votre patience. Un petit mot fait toujours plaisir.
Ces changements vont vous permettre de supprimer les médicaments dont la prise est à zéro (0)
depuis longtemps et que vous ne prendrez plus.
Ils vont également me permettre d'avancer sur la prochaine étape qui est de plus présenter les noms
Ils vont également me permettre d'avancer sur la prochaine étape qui est de plus présenté les noms
des médicaments, mais la molécule (doliprane, efferalgan, dafalgan deviendront paracétamol).
Je vous en dirais plus prochainement.
Je vous en dirai plus prochainement.
Merci de me faire des retours sur ces nouveautés, [Pilldroid](mailto:jacques+pilldroid@foucry.net)
[Pilldroid](mailto:pilldroid@foucry.net)ou pilldroid@foucry.net.

View file

@ -1,26 +1,19 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
org.gradle.unsafe.configuration-cache=true
org.gradle.warning.mode=none
org.gradle.unsafe.configuration-cache-problems=warn
android.defaults.buildfeatures.buildconfig=true
#Wed Apr 17 19:53:26 CEST 2024
android.enableJetifier=false
android.nonFinalResIds=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2048M
org.gradle.warning.mode=none

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Wed Sep 29 16:41:02 CEST 2021
#Fri Sep 22 18:17:05 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

317
gradlew vendored
View file

@ -1,74 +1,127 @@
#!/usr/bin/env bash
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
MAX_FD=maximum
warn ( ) {
warn () {
echo "$*"
}
} >&2
die ( ) {
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -77,84 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

66
gradlew.bat vendored
View file

@ -1,4 +1,20 @@
@if "%DEBUG%" == "" @echo off
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@ -8,20 +24,24 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -35,7 +55,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@ -45,44 +65,26 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal