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/ gen/
/android-signing-keystore.jks /android-signing-keystore.jks
/secrets.properties /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 à Pilldroid est une application de gestion de stock **théorique** de médicament à
destination des personnes résidant en France. 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 ## Ce que n'est pas Pilldroid
- Pilldroid n'est pas un pilulier. Pilldroid ne vous rappellera pas de prendre - 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. - Pilldroid ne vous surveille pas.
## Pourquoi « Stock théorique » ? ## Pourquoi « Stock théorique » ?
Pilldroid ne sait (et n'a aucun moyen de savoir) si vous avez ou non pris vos 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. jour`. Ce calcul est fait tous les jours entre 11h et midi.
## De quelles autorisations l'application Pilldroid a-t-elle besoin ? ## 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 - 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 - Pilldroid a besoin d'accéder à l'appareil photo de votre téléphone pour
scanner le code barre des boites de médicaments ; scanner le code-barres des boîtes de médicaments.
- Pilldroid a besoin de pouvoir vous envoyer des alarmes ; - Pilldroid a besoin de pouvoir vous envoyer des alarmes.
- Pilldroid a besoin de faire vibrer le téléphone pour les alarmes ; - Pilldroid a besoin de faire vibrer le téléphone pour les alarmes.
## L'application Pilldroid embarque-t-elle des bibliothèques tierce ? ## 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 [zxing](https://github.com/journeyapps/zxing-android-embedded) lui-même libre et
ouvert. ouvert.
## L'application Pilldroid contient-elle des pisteurs ? ## 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 ? ## D'où viennent les données de Pilldroid ?
Elles sont issues de plusieurs fichiers de l'Agence pour la Sécurité des 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 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).
prochainement mis sur mon compte `github`.
## Comment peut-on participer à Pilldroid ? ## Comment peut-on participer à Pilldroid ?

View file

@ -30,21 +30,23 @@ android {
keyPassword secretProperties['signing_key_password'] keyPassword secretProperties['signing_key_password']
} }
} }
compileSdk 33 compileSdk 34
defaultConfig { defaultConfig {
applicationId "net.foucry.pilldroid" applicationId "net.foucry.pilldroid"
minSdkVersion defaultMinSdkVersion minSdk defaultMinSdkVersion
targetSdkVersion defaultTargetSdkVersion targetSdk defaultTargetSdkVersion
versionCode 302 versionCode 302
versionName "v0.302-beta" versionName "v0.302-beta"
multiDexEnabled true
javaCompileOptions { javaCompileOptions {
annotationProcessorOptions { annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()] arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
} }
} }
} }
buildFeatures {
buildConfig = true
}
buildTypes { buildTypes {
debug { debug {
@ -59,7 +61,7 @@ android {
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
flavorDimensions "version" flavorDimensions = ["version"]
productFlavors { productFlavors {
dev { dev {
resValue "string", "app_name", "PillDroid dev" resValue "string", "app_name", "PillDroid dev"
@ -77,7 +79,6 @@ android {
targetCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11
} }
buildToolsVersion = "32.0.0"
namespace 'net.foucry.pilldroid' namespace 'net.foucry.pilldroid'
allprojects { allprojects {
@ -97,23 +98,25 @@ sourceSets {
} }
} }
} }
dependencies { dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.room:room-common:2.4.3" implementation "androidx.room:room-common:2.6.1"
annotationProcessor "androidx.room:room-compiler:2.4.3" annotationProcessor "androidx.room:room-compiler:2.6.1"
implementation "androidx.room:room-testing:2.4.3" implementation "androidx.room:room-testing:2.6.1"
implementation "androidx.room:room-rxjava3:2.4.3" implementation "androidx.room:room-rxjava3:2.6.1"
implementation "androidx.room:room-runtime:2.4.3" implementation "androidx.room:room-runtime:2.6.1"
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.google.android.material:material:1.7.0' implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:4.3.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="android.permission.ACCESS_NOTIFICATION_POLICY"/>
<uses-permission android:name="com.android.alarm.permission.SET_ALARM"/> <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.SCHEDULE_EXACT_ALARM"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application <application
@ -69,5 +68,4 @@
android:name="preloaded_fonts" android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" /> android:resource="@array/preloaded_fonts" />
</application> </application>
</manifest> </manifest>

View file

@ -12,11 +12,12 @@
p.red { p.red {
color: #ff2600; color: #ff2600;
}</style> }</style>
<title>About</title>
</head> </head>
<body> <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>--> <!--<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 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>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> <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; package net.foucry.pilldroid;
import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
@ -11,8 +10,7 @@ import android.widget.ImageButton;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.journeyapps.barcodescanner.BarcodeCallback; import androidx.appcompat.app.AppCompatActivity;
import com.journeyapps.barcodescanner.BarcodeResult;
import com.journeyapps.barcodescanner.CaptureManager; import com.journeyapps.barcodescanner.CaptureManager;
import com.journeyapps.barcodescanner.DecoratedBarcodeView; import com.journeyapps.barcodescanner.DecoratedBarcodeView;
import com.journeyapps.barcodescanner.ViewfinderView; 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. * 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(); private static final String TAG = CustomScannerActivity.class.getName();
final Bundle captureIntentBundle = new Bundle(); final Bundle captureIntentBundle = new Bundle();
@ -57,9 +55,7 @@ public class CustomScannerActivity extends Activity implements DecoratedBarcodeV
//changeMaskColor(null); //changeMaskColor(null);
changeLaserVisibility(true); changeLaserVisibility(true);
barcodeScannerView.decodeSingle(new BarcodeCallback() { barcodeScannerView.decodeSingle(result -> {
@Override
public void barcodeResult(BarcodeResult result) {
Intent scanResult = new Intent(); Intent scanResult = new Intent();
//Bundle scanResultBundle = new Bundle(); //Bundle scanResultBundle = new Bundle();
scanResult.putExtra("Barcode Content", result.getText()); scanResult.putExtra("Barcode Content", result.getText());
@ -69,7 +65,6 @@ public class CustomScannerActivity extends Activity implements DecoratedBarcodeV
CustomScannerActivity.this.setResult(RESULT_OK, scanResult); CustomScannerActivity.this.setResult(RESULT_OK, scanResult);
Log.d(TAG, "scanResult == " + scanResult); Log.d(TAG, "scanResult == " + scanResult);
finish(); finish();
}
}); });
} }
@ -91,6 +86,11 @@ public class CustomScannerActivity extends Activity implements DecoratedBarcodeV
capture.onDestroy(); capture.onDestroy();
} }
@Override
public void onBackPressed(){
onCancel(this.getCurrentFocus());
}
@Override @Override
protected void onSaveInstanceState(Bundle outState) { protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);

View file

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

View file

@ -1,20 +1,17 @@
package net.foucry.pilldroid; package net.foucry.pilldroid;
import static net.foucry.pilldroid.R.id.detail_toolbar;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView; import android.widget.TextView;
import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity; 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.dao.PrescriptionsDAO;
import net.foucry.pilldroid.databases.PrescriptionDatabase; import net.foucry.pilldroid.databases.PrescriptionDatabase;
import net.foucry.pilldroid.models.Prescription; import net.foucry.pilldroid.models.Prescription;
@ -43,23 +40,20 @@ public class DrugDetailActivity extends AppCompatActivity {
Log.d(TAG, "aPrescription == " + aPrescription); Log.d(TAG, "aPrescription == " + aPrescription);
setContentView(R.layout.drug_detail_activity); setContentView(R.layout.drug_detail_activity);
Toolbar toolbar = findViewById(detail_toolbar); MaterialToolbar toolbar = findViewById(R.id.toolbar);
if (toolbar != null) { if (toolbar != null) {
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
} }
ImageButton fab = findViewById(R.id.fab); ExtendedFloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() { fab.setOnClickListener(v -> {
@Override
public void onClick(View view) {
Log.d(TAG, "Click on save icon"); Log.d(TAG, "Click on save icon");
getDrugChanges(); getDrugChanges();
setResult(1); setResult(1);
finish(); finish();
overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right); overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right);
}
}); });
// Show the Up button in the action bar. // 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.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.appbar.CollapsingToolbarLayout; import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textview.MaterialTextView;
import net.foucry.pilldroid.models.Prescription; import net.foucry.pilldroid.models.Prescription;
/** /**
@ -52,7 +51,7 @@ public class DrugDetailFragment extends Fragment {
Activity activity = this.getActivity(); Activity activity = this.getActivity();
assert activity != null; assert activity != null;
CollapsingToolbarLayout appBarLayout = activity.findViewById(R.id.toolbar_layout); MaterialToolbar appBarLayout = activity.findViewById(R.id.toolbar);
if (appBarLayout != null) { if (appBarLayout != null) {
appBarLayout.setTitle(prescription.getName()); appBarLayout.setTitle(prescription.getName());
} }
@ -74,34 +73,34 @@ public class DrugDetailFragment extends Fragment {
if (prescription != null) { if (prescription != null) {
// Find each component of rootView // Find each component of rootView
nameView = detailView.findViewById(R.id.name_cell); nameView = detailView.findViewById(R.id.name_cell);
TextView nameLabel = nameView.findViewById(R.id.label); MaterialTextView nameLabel = nameView.findViewById(R.id.label);
TextView nameValue = nameView.findViewById(R.id.value); MaterialTextView nameValue = nameView.findViewById(R.id.value);
nameLabel.setText(R.string.drug_name_label); nameLabel.setText(R.string.drug_name_label);
nameValue.setText(prescription.getName()); nameValue.setText(prescription.getName());
presentationView = detailView.findViewById(R.id.presentation_cell); presentationView = detailView.findViewById(R.id.presentation_cell);
TextView presentationLabel = presentationView.findViewById(R.id.label); MaterialTextView presentationLabel = presentationView.findViewById(R.id.label);
TextView presentationValue = presentationView.findViewById(R.id.value); MaterialTextView presentationValue = presentationView.findViewById(R.id.value);
presentationLabel.setText(R.string.drug_presentation_label); presentationLabel.setText(R.string.drug_presentation_label);
presentationValue.setText(prescription.getPresentation()); presentationValue.setText(prescription.getPresentation());
adminModeView = detailView.findViewById(R.id.administration_cell); adminModeView = detailView.findViewById(R.id.administration_cell);
TextView adminModeLabel = adminModeView.findViewById(R.id.label); MaterialTextView adminModeLabel = adminModeView.findViewById(R.id.label);
TextView adminModeValue = adminModeView.findViewById(R.id.value); MaterialTextView adminModeValue = adminModeView.findViewById(R.id.value);
adminModeLabel.setText(R.string.drug_administrationMode_label); adminModeLabel.setText(R.string.drug_administrationMode_label);
adminModeValue.setText(prescription.getAdministration_mode()); adminModeValue.setText(prescription.getAdministration_mode());
stockView = detailView.findViewById(R.id.stock_cell); stockView = detailView.findViewById(R.id.stock_cell);
TextView stockLibelle = (stockView.findViewById(R.id.label)); MaterialTextView stockLibelle = (stockView.findViewById(R.id.label));
TextView stockValue = stockView.findViewById(R.id.value); TextInputEditText stockValue = stockView.findViewById(R.id.value);
stockLibelle.setText(R.string.drug_current_stock_label); stockLibelle.setText(R.string.drug_current_stock_label);
stockValue.setText(Utils.fmt(prescription.getStock())); stockValue.setText(Utils.fmt(prescription.getStock()));
stockValue.setHint(R.string.drug_current_stock_label); stockValue.setHint(R.string.drug_current_stock_label);
stockValue.setSelectAllOnFocus(true); stockValue.setSelectAllOnFocus(true);
takeView = detailView.findViewById(R.id.take_cell); takeView = detailView.findViewById(R.id.take_cell);
TextView takeLabel = takeView.findViewById(R.id.label); MaterialTextView takeLabel = takeView.findViewById(R.id.label);
TextView takeValue = (takeView.findViewById(R.id.value)); TextInputEditText takeValue = (takeView.findViewById(R.id.value));
takeLabel.setText(R.string.drug_take_label); takeLabel.setText(R.string.drug_take_label);
//takeValue.setText(Double.toString(prescription.getTake())); //takeValue.setText(Double.toString(prescription.getTake()));
takeValue.setText(Utils.fmt(prescription.getTake())); takeValue.setText(Utils.fmt(prescription.getTake()));
@ -109,8 +108,8 @@ public class DrugDetailFragment extends Fragment {
takeValue.setSelectAllOnFocus(true); takeValue.setSelectAllOnFocus(true);
warningView = detailView.findViewById(R.id.warning_cell); warningView = detailView.findViewById(R.id.warning_cell);
TextView warningLibelle = warningView.findViewById(R.id.label); MaterialTextView warningLibelle = warningView.findViewById(R.id.label);
TextView warningValue = warningView.findViewById(R.id.value); TextInputEditText warningValue = warningView.findViewById(R.id.value);
warningLibelle.setText(R.string.drug_warningThreshold_label); warningLibelle.setText(R.string.drug_warningThreshold_label);
//warningValue.setText(Integer.toString(prescription.getWarnThreshold())); //warningValue.setText(Integer.toString(prescription.getWarnThreshold()));
warningValue.setText(Utils.fmt(prescription.getWarning())); warningValue.setText(Utils.fmt(prescription.getWarning()));
@ -118,8 +117,8 @@ public class DrugDetailFragment extends Fragment {
warningValue.setSelectAllOnFocus(true); warningValue.setSelectAllOnFocus(true);
alertView = detailView.findViewById(R.id.alert_cell); alertView = detailView.findViewById(R.id.alert_cell);
TextView alertLibelle = alertView.findViewById(R.id.label); MaterialTextView alertLibelle = alertView.findViewById(R.id.label);
TextView alertValue = alertView.findViewById(R.id.value); TextInputEditText alertValue = alertView.findViewById(R.id.value);
alertLibelle.setText(R.string.drug_alertThreshold_label); alertLibelle.setText(R.string.drug_alertThreshold_label);
//alertValue.setText(Integer.toString(prescription.getAlertThreshold())); //alertValue.setText(Integer.toString(prescription.getAlertThreshold()));
alertValue.setText(Utils.fmt(prescription.getAlert())); alertValue.setText(Utils.fmt(prescription.getAlert()));

View file

@ -59,6 +59,9 @@ import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Objects;
;
/** /**
* An activity representing a list of Drugs is activity * 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"; public final String BARCODE_CONTENT = "Barcode Content";
// Used for dev and debug // Used for dev and debug
final Boolean DEMO = false; final Boolean DEMO = false;
final private boolean enableLog = true;
final private boolean encryptBackup = true;
public PrescriptionDatabase prescriptions; public PrescriptionDatabase prescriptions;
public MedicineDatabase medicines; public MedicineDatabase medicines;
private ActivityResultLauncher<ScanOptions> mBarcodeScannerLauncher; private ActivityResultLauncher<ScanOptions> mBarcodeScannerLauncher;
@ -107,7 +112,7 @@ public class DrugListActivity extends AppCompatActivity {
// Manually migrate old database to room // Manually migrate old database to room
PrescriptionsDAO prescriptionsDAO = prescriptions.getPrescriptionsDAO(); PrescriptionsDAO prescriptionsDAO = prescriptions.getPrescriptionsDAO();
DBHelper dbHelper = new DBHelper(this); try (DBHelper dbHelper = new DBHelper(this)) {
if (dbHelper.getCount() != 0) { if (dbHelper.getCount() != 0) {
List<Drug> drugs = dbHelper.getAllDrugs(); List<Drug> drugs = dbHelper.getAllDrugs();
for (int count = 0; count < dbHelper.getCount(); count++) { for (int count = 0; count < dbHelper.getCount(); count++) {
@ -133,6 +138,7 @@ public class DrugListActivity extends AppCompatActivity {
} }
dbHelper.dropDrug(); dbHelper.dropDrug();
} }
}
// remove old notification // remove old notification
Log.d(TAG, "Remove old notification and old job"); Log.d(TAG, "Remove old notification and old job");
NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
@ -222,6 +228,7 @@ public class DrugListActivity extends AppCompatActivity {
Log.d(TAG, "Missing camera permission"); Log.d(TAG, "Missing camera permission");
Toast.makeText(this, R.string.missing_camera_permission, Toast.LENGTH_LONG).show(); Toast.makeText(this, R.string.missing_camera_permission, Toast.LENGTH_LONG).show();
} else { } else {
assert bundle != null;
Log.d(TAG, "bundle == " + bundle.getInt("returnCode")); Log.d(TAG, "bundle == " + bundle.getInt("returnCode"));
int returnCode = bundle.getInt("returnCode"); int returnCode = bundle.getInt("returnCode");
int resultCode = bundle.getInt("resultCode"); int resultCode = bundle.getInt("resultCode");
@ -245,13 +252,13 @@ public class DrugListActivity extends AppCompatActivity {
} }
String cip13; String cip13;
switch (bundle.getString(BARCODE_FORMAT_NAME)) { switch (Objects.requireNonNull(bundle.getString(BARCODE_FORMAT_NAME))) {
case "CODE_128": case "CODE_128":
case "EAN_13": //CODE_128 || EAN 13 case "EAN_13": //CODE_128 || EAN 13
cip13 = bundle.getString(BARCODE_CONTENT); cip13 = bundle.getString(BARCODE_CONTENT);
break; break;
case "DATA_MATRIX": case "DATA_MATRIX":
cip13 = bundle.getString(BARCODE_CONTENT).substring(4, 17); cip13 = Objects.requireNonNull(bundle.getString(BARCODE_CONTENT)).substring(4, 17);
break; break;
default: default:
scanNotOK(); scanNotOK();
@ -300,6 +307,11 @@ public class DrugListActivity extends AppCompatActivity {
startActivity(new Intent(this, WelcomeActivity.class)); startActivity(new Intent(this, WelcomeActivity.class));
return true; 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); return super.onOptionsItemSelected(item);
} }
@ -338,7 +350,7 @@ public class DrugListActivity extends AppCompatActivity {
protected void showInputDialog() { protected void showInputDialog() {
final Dialog dialog = new Dialog(this); final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); 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.setCancelable(true);
dialog.setCanceledOnTouchOutside(true); dialog.setCanceledOnTouchOutside(true);
@ -348,11 +360,9 @@ public class DrugListActivity extends AppCompatActivity {
Button cancel = dialog.findViewById(R.id.notagreed); Button cancel = dialog.findViewById(R.id.notagreed);
ok.setEnabled(false); ok.setEnabled(false);
//TextView title = (TextView ) dialog.findViewById(R.id.title); //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()); 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); ok.setText(R.string.button_ok);
cancel.setText(R.string.button_cancel); cancel.setText(R.string.button_cancel);
editText.addTextChangedListener(new TextWatcher() { editText.addTextChangedListener(new TextWatcher() {
@ -370,21 +380,16 @@ public class DrugListActivity extends AppCompatActivity {
ok.setEnabled(s.length() == 8); ok.setEnabled(s.length() == 8);
} }
}); });
ok.setOnClickListener(new View.OnClickListener() { ok.setOnClickListener(v -> {
public void onClick(View v) {
dialog.cancel(); dialog.cancel();
Log.i("EditText Value",editText.getEditableText().toString()); Log.i("EditText Value", editText.getEditableText().toString());
MedicinesDAO medicinesDAO = medicines.getMedicinesDAO(); MedicinesDAO medicinesDAO = medicines.getMedicinesDAO();
Medicine aMedicine = medicinesDAO.getMedicineByCIP13(cip13); Medicine aMedicine = medicinesDAO.getMedicineByCIP13(cip13);
askToAddInDB(aMedicine); askToAddInDB(aMedicine);
}
}); });
cancel.setOnClickListener(new View.OnClickListener() { cancel.setOnClickListener(v -> {
@Override
public void onClick(View v) {
dialog.cancel(); dialog.cancel();
Log.i(TAG, "dismiss dialog"); Log.i(TAG, "dismiss dialog");
}
}); });
dialog.show(); dialog.show();
@ -399,7 +404,7 @@ public class DrugListActivity extends AppCompatActivity {
private void askToAddInDB(Medicine aMedicine) { private void askToAddInDB(Medicine aMedicine) {
final Dialog dlg = new Dialog(this); final Dialog dlg = new Dialog(this);
dlg.requestWindowFeature(Window.FEATURE_NO_TITLE); 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.setContentView(R.layout.custom_dialog_layout_one_button);
dlg.setCancelable(false); dlg.setCancelable(false);
TextView msg = dlg.findViewById(R.id.msg); TextView msg = dlg.findViewById(R.id.msg);
@ -414,31 +419,23 @@ public class DrugListActivity extends AppCompatActivity {
msgString = aMedicine.getName() + " " + getString(R.string.msgFound); msgString = aMedicine.getName() + " " + getString(R.string.msgFound);
msg.setText(msgString); msg.setText(msgString);
cplString = getString(R.string.addInList); cplString = getString(R.string.addInList);
if (cplString.equals("")) { if (cplString.isEmpty()) {
cpl.setEnabled(false); cpl.setEnabled(false);
} }
icon.setImageResource(R.drawable.tickmark); icon.setImageResource(R.drawable.tickmark);
btn.setOnClickListener(new View.OnClickListener() { btn.setOnClickListener(v -> {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
dlg.dismiss(); dlg.dismiss();
finish(); finish();
addDrugToList(Utils.medicine2prescription(aMedicine)); addDrugToList(Utils.medicine2prescription(aMedicine));
}
}); });
} else { } else {
msgString = getString(R.string.msgNotFound); msgString = getString(R.string.msgNotFound);
msg.setText(msgString); msg.setText(msgString);
cpl.setText(""); cpl.setText("");
icon.setImageResource(R.drawable.tickcross); //TODO: Exception imageResource null Object reference icon.setImageResource(R.drawable.tickcross); //TODO: Exception imageResource null Object reference
btn.setOnClickListener(new View.OnClickListener() { btn.setOnClickListener(v -> {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
dlg.dismiss(); dlg.dismiss();
finish(); finish();
}
}); });
} }
dlg.show(); dlg.show();
@ -516,12 +513,9 @@ public class DrugListActivity extends AppCompatActivity {
} }
Snackbar.make(recyclerView, prescription.getName(), Snackbar.make(recyclerView, prescription.getName(),
Snackbar.LENGTH_LONG).setAction(R.string.Undo, new View.OnClickListener() { Snackbar.LENGTH_LONG).setAction(R.string.Undo, v -> {
@Override
public void onClick(View v) {
prescriptionList.add(position, prescription); prescriptionList.add(position, prescription);
mAdapter.notifyItemInserted(position); mAdapter.notifyItemInserted(position);
}
}).show(); }).show();
} }
@ -649,9 +643,7 @@ public class DrugListActivity extends AppCompatActivity {
holder.mView.setBackgroundResource(R.drawable.gradient_bg); holder.mView.setBackgroundResource(R.drawable.gradient_bg);
holder.mIconView.setImageResource(R.drawable.ic_suspended_pill); holder.mIconView.setImageResource(R.drawable.ic_suspended_pill);
holder.mView.setOnClickListener(new View.OnClickListener() { holder.mView.setOnClickListener(v -> {
@Override
public void onClick(View v) {
Prescription aPrescription = mValues.get(position); Prescription aPrescription = mValues.get(position);
Context context = v.getContext(); Context context = v.getContext();
Intent intent = new Intent(context, DrugDetailActivity.class); Intent intent = new Intent(context, DrugDetailActivity.class);
@ -659,7 +651,6 @@ public class DrugListActivity extends AppCompatActivity {
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left); overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left);
}
}); });
} else { } else {
int remainingStock = (int) Math.floor(mValues.get(position).getStock() / mValues.get(position).getTake()); 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.mIconView.setImageResource(R.drawable.ok_stock_vect);
} }
holder.mView.setOnClickListener(new View.OnClickListener() { holder.mView.setOnClickListener(v -> {
@Override
public void onClick(View v) {
Prescription prescription = mValues.get(position); Prescription prescription = mValues.get(position);
Context context = v.getContext(); Context context = v.getContext();
Intent intent = new Intent(context, DrugDetailActivity.class); Intent intent = new Intent(context, DrugDetailActivity.class);
intent.putExtra("prescription", prescription); intent.putExtra("prescription", prescription);
startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE); startActivityForResult(intent, CUSTOMIZED_REQUEST_CODE);
overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left); 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.Medicine;
import net.foucry.pilldroid.models.Prescription; import net.foucry.pilldroid.models.Prescription;
import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
@ -49,15 +48,11 @@ public class Utils {
} }
public static void sortPrescriptionList(List<Prescription> prescriptionList) { public static void sortPrescriptionList(List<Prescription> prescriptionList) {
prescriptionList.sort(new Comparator<>() { prescriptionList.sort((lhs, rhs) -> {
@Override
public int compare(Prescription lhs, Prescription rhs) {
if (lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock()) != 0) if (lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock()) != 0)
return lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock()); return lhs.getDateEndOfStock().compareTo(rhs.getDateEndOfStock());
else else
return (int) (lhs.getStock() - rhs.getStock()); return (int) (lhs.getStock() - rhs.getStock());
}
}); });
} }
} }

View file

@ -13,23 +13,23 @@ import android.view.Window;
import android.view.WindowInsets; import android.view.WindowInsets;
import android.view.WindowInsetsController; import android.view.WindowInsetsController;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.viewpager.widget.PagerAdapter; import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager; 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 { public class WelcomeActivity extends AppCompatActivity {
private ViewPager viewPager; private ViewPager viewPager;
private LinearLayout dotsLayout; private LinearLayout dotsLayout;
private int[] layouts; private int[] layouts;
private Button btnSkip, btnNext; private MaterialButton btnSkip, btnNext;
// viewpager change listener // viewpager change listener
final ViewPager.OnPageChangeListener viewPagerPageChangeListener = new ViewPager.OnPageChangeListener() { 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.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dlg.setContentView(R.layout.custom_dialog_layout_one_button); dlg.setContentView(R.layout.custom_dialog_layout_one_button);
dlg.setCancelable(false); dlg.setCancelable(false);
TextView msg = dlg.findViewById(R.id.msg); MaterialTextView msg = dlg.findViewById(R.id.msg);
String msgString; String msgString;
TextView cpl = dlg.findViewById(R.id.cpl); MaterialTextView cpl = dlg.findViewById(R.id.cpl);
String cplString = ""; ShapeableImageView icon = dlg.findViewById(R.id.image);
ImageView icon = dlg.findViewById(R.id.image); MaterialButton btn = dlg.findViewById(R.id.txtClose);
Button btn = dlg.findViewById(R.id.txtClose);
dlg.show(); dlg.show();
msgString = getString(R.string.understood); msgString = getString(R.string.understood);
msg.setText(msgString); msg.setText(msgString);
if (cplString.equals("")) { cpl.setVisibility(View.GONE);
cpl.setEnabled(false);
}
//icon.setImageResource(R.drawable.pilldroid_icon); //icon.setImageResource(R.drawable.pilldroid_icon);
btn.setText(R.string.Yes); btn.setText(R.string.Yes_understood);
btn.setOnClickListener(new View.OnClickListener() { btn.setOnClickListener(v -> {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
dlg.dismiss(); dlg.dismiss();
finish();
}
}); });
} }
private void addBottomDots(int currentPage) { private void addBottomDots(int currentPage) {
TextView[] dots = new TextView[layouts.length]; MaterialTextView[] dots = new MaterialTextView[layouts.length];
dotsLayout.removeAllViews(); dotsLayout.removeAllViews();
for (int i = 0; i < dots.length; i++) { for (int i = 0; i < dots.length; i++) {
dots[i] = new TextView(this); dots[i] = new MaterialTextView(this);
dots[i].setText(""); dots[i].setText("");
dots[i].setTextSize(65); dots[i].setTextSize(65);
dots[i].setTextColor(ContextCompat.getColor(this, R.color.dot_dark)); dots[i].setTextColor(ContextCompat.getColor(this, R.color.dot_dark));
@ -201,6 +194,7 @@ public class WelcomeActivity extends AppCompatActivity {
window.setStatusBarColor(Color.TRANSPARENT); window.setStatusBarColor(Color.TRANSPARENT);
} }
@SuppressWarnings("deprecation")
private void setFullScreen() { private void setFullScreen() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
getWindow().setDecorFitsSystemWindows(false); getWindow().setDecorFitsSystemWindows(false);
@ -210,7 +204,6 @@ public class WelcomeActivity extends AppCompatActivity {
controller.setSystemBarsBehavior(WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE); controller.setSystemBarsBehavior(WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);
} }
} else { } else {
//noinspection
getWindow().getDecorView().setSystemUiVisibility( getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_FULLSCREEN View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | 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" <vector android:height="60dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android"> 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> </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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="16dp" android:layout_marginStart="16dp"
android:layout_marginRight="16dp" android:layout_marginEnd="16dp"
android:baselineAligned="false" android:baselineAligned="false"
android:divider="?android:attr/dividerHorizontal" android:divider="?android:attr/dividerHorizontal"
android:orientation="horizontal" android:orientation="horizontal"
@ -23,8 +23,8 @@
android:name="net.foucry.pilldroid.MedicamentListFragment" android:name="net.foucry.pilldroid.MedicamentListFragment"
android:layout_width="@dimen/item_width" android:layout_width="@dimen/item_width"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="16dp" android:layout_marginStart="16dp"
android:layout_marginRight="16dp" android:layout_marginEnd="16dp"
app:layoutManager="LinearLayoutManager" app:layoutManager="LinearLayoutManager"
tools:context="net.foucry.pilldroid.DrugListActivity" tools:context="net.foucry.pilldroid.DrugListActivity"
tools:listitem="@layout/drug_list_content" /> tools:listitem="@layout/drug_list_content" />

View file

@ -1,12 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/white" android:background="@android:color/white"
android:orientation="vertical" android:orientation="vertical"
tools:ignore="Overdraw"> 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 <WebView
android:id="@+id/aboutHtml" android:id="@+id/aboutHtml"
android:layout_width="match_parent" android:layout_width="match_parent"

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -21,6 +21,8 @@
<string name="flashlightButton">Allumer/Eteindre le Flash</string> <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_here">Saisir la fin du code CIP 13 ici..</string>
<string name="enter_cip_13">Saisir le code CIP 13</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 --> <!-- Slide Strings -->
<string name="slide1_Pilldroid">Bienvenue dans Pilldroid</string> <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="notInterpreted">Le code barre ne peut pas être interprété</string>
<string name="cancelled_scan">Scan annulé</string> <string name="cancelled_scan">Scan annulé</string>
<string name="missing_camera_permission">Autorisation appareil photo manquante</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="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="Undo">Annuler</string>
<string name="trash_icon">Icône de poubelle</string> <string name="trash_icon">Icône de poubelle</string>

View file

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

View file

@ -22,6 +22,8 @@
<string name="enter_cip_13">Enter CIP 13</string> <string name="enter_cip_13">Enter CIP 13</string>
<string name="channel_description" translatable="false">Pilldroid_NotificationChannel</string> <string name="channel_description" translatable="false">Pilldroid_NotificationChannel</string>
<string name="channel_name" translatable="false">PilldroidChannel</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 --> <!-- slides strings -->
<string name="slide1_Pilldroid">Welcome on Pilldroid</string> <string name="slide1_Pilldroid">Welcome on Pilldroid</string>
@ -68,7 +70,8 @@
<string name="notInterpreted">Bar code cannot be interpreted</string> <string name="notInterpreted">Bar code cannot be interpreted</string>
<string name="cancelled_scan">Scan canceled</string> <string name="cancelled_scan">Scan canceled</string>
<string name="missing_camera_permission">Missing camera permission</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="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="Undo">Undo</string>
<string name="trash_icon">Trash icon</string> <string name="trash_icon">Trash icon</string>

View file

@ -1,11 +1,14 @@
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</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>
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
@ -13,9 +16,9 @@
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
</style> </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"> <style name="MyDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<!--buttons color--> <!--buttons color-->

View file

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

View file

@ -1,6 +1,6 @@
# v0.300-beta - Nouvelles fonctionnalités # 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 - un glissement de la droite vers la gauche supprime le médicament de la liste ET de
la base données ; la base données ;
- un glissement de la gauche vers la droite permet de modifier les détails du médicament, - 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) 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. 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). 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) 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. [Pilldroid](mailto:pilldroid@foucry.net)ou pilldroid@foucry.net.

View file

@ -1,12 +1,12 @@
# V0.302-beta - bugs fix and small interface changes # 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 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 ; que j'ai mis à la corriger ;
- Suppression de vieux code et vieux commentaires ; - 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; 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é. 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 # 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 - un glissement de la droite vers la gauche supprime le médicament de la liste ET de
la base données ; la base données ;
- un glissement de la gauche vers la droite permet de modifier les détails du médicament, - 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) 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. 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). 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) 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. [Pilldroid](mailto:pilldroid@foucry.net)ou pilldroid@foucry.net.

View file

@ -1,26 +1,19 @@
# Project-wide Gradle settings. ## For more details on how to configure your build environment visit
# 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
# http://www.gradle.org/docs/current/userguide/build_environment.html # http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # 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 # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. For more details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true # org.gradle.parallel=true
android.enableJetifier=true #Wed Apr 17 19:53:26 CEST 2024
android.useAndroidX=true android.enableJetifier=false
org.gradle.unsafe.configuration-cache=true android.nonFinalResIds=true
org.gradle.warning.mode=none
org.gradle.unsafe.configuration-cache-problems=warn
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false 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 distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME 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. # Attempt to set APP_HOME
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle" # Resolve links: $0 may be a link
APP_BASE_NAME=`basename "$0"` 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. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD=maximum
warn ( ) { warn () {
echo "$*" echo "$*"
} } >&2
die ( ) { die () {
echo echo
echo "$*" echo "$*"
echo echo
exit 1 exit 1
} } >&2
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false cygwin=false
msys=false msys=false
darwin=false darwin=false
case "`uname`" in nonstop=false
CYGWIN* ) case "$( uname )" in #(
cygwin=true CYGWIN* ) cygwin=true ;; #(
;; Darwin* ) darwin=true ;; #(
Darwin* ) MSYS* | MINGW* ) msys=true ;; #(
darwin=true NONSTOP* ) nonstop=true ;;
;;
MINGW* )
msys=true
;;
esac 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 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD=$JAVA_HOME/jre/sh/java
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD=$JAVA_HOME/bin/java
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 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." location of your Java installation."
fi fi
else else
JAVACMD="java" 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. 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 Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
MAX_FD_LIMIT=`ulimit -H -n` case $MAX_FD in #(
if [ $? -eq 0 ] ; then max*)
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
MAX_FD="$MAX_FD_LIMIT" # shellcheck disable=SC3045
fi MAX_FD=$( ulimit -H -n ) ||
ulimit -n $MAX_FD warn "Could not query maximum file descriptor limit"
if [ $? -ne 0 ] ; then esac
warn "Could not set maximum file descriptor limit: $MAX_FD" case $MAX_FD in #(
fi '' | soft) :;; #(
else *)
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
fi # shellcheck disable=SC3045
fi ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
# 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" ;;
esac esac
fi fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules # Collect all arguments for the java command, stacking in reverse order:
function splitJvmOpts() { # * args from the command line
JVM_OPTS=("$@") # * the main class name
} # * -classpath
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS # * -D...appname settings
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" # * --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 @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@ -8,20 +24,24 @@
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal 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 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% 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 @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 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_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto execute
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@ -45,44 +65,26 @@ echo location of your Java installation.
goto fail 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 :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @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 :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal