Skip to content

Commit

Permalink
Merge branch 'release-2.5.5'
Browse files Browse the repository at this point in the history
* release-2.5.5:
  Bump version for release 2.5.5
  Update translations.
  build: update Gradle plugin to 3.1.2
  build: update Kotlin version to 1.2.40
  Support adaptive icons
  StockDisplayUtils: solve some compilation warnings
  MedicineItem: fix missing string for stock info under some cases
  Update build tools versions
  build: Update Gradle plugin and dist
  PickupNotification: unwrap useless version checks
  • Loading branch information
AlvaroBrey committed May 11, 2018
2 parents 0a43f30 + 366e78b commit 770d046
Show file tree
Hide file tree
Showing 45 changed files with 533 additions and 151 deletions.
8 changes: 4 additions & 4 deletions Calendula/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ task copyTestClasses(type: Copy) {
}

android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 35
versionName "2.5.4"
versionCode 36
versionName "2.5.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
applicationId "es.usc.citius.servando.calendula"
multiDexEnabled true
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Calendula/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<application
android:name=".CalendulaApp"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">

Expand Down
Binary file modified Calendula/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,13 @@ public static void notify(final Context context, final String title, final Strin
public static void cancel(final Context context) {
final NotificationManager nm = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
nm.cancel(NOTIFICATION_TAG, 0);
} else {
nm.cancel(NOTIFICATION_TAG.hashCode());
}
nm.cancel(NOTIFICATION_TAG, 0);
}

@TargetApi(Build.VERSION_CODES.ECLAIR)
private static void notify(final Context context, final Notification notification) {
final NotificationManager nm = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
nm.notify(NOTIFICATION_TAG, 0, notification);
} else {
nm.notify(NOTIFICATION_TAG.hashCode(), notification);
}
nm.notify(NOTIFICATION_TAG, 0, notification);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public void bindView(MedicineViewHolder holder, List<Object> payloads) {

if (medicine.getStock() != null && medicine.getStock() >= 0) {
holder.stockInfo.setText(ctx.getString(R.string.stock_remaining_msg, medicine.getStock().intValue(), medicine.getPresentation().units(ctx.getResources(), medicine.getStock())));
} else {
holder.stockInfo.setText(R.string.no_stock_info_msg);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ object StockDisplayUtils {
.withDialogAnimation(true)
.setDescription(msg)
.setPositiveText(R.string.manage_stock)
.onPositive { dialog, which ->
.onPositive { _, _ ->
val i = Intent(context, MedicinesActivity::class.java)
i.putExtra(CalendulaApp.INTENT_EXTRA_MEDICINE_ID, m.id)
context.startActivity(i)
}
.setNeutralText(R.string.tutorial_understood)
.onNeutral { dialog, which -> dialog.dismiss() }
.onNeutral { dialog, _ -> dialog.dismiss() }
.show()

}
Expand Down
Binary file removed Calendula/src/main/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed Calendula/src/main/res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions Calendula/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions Calendula/src/main/res/values-de/strings_translatable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,20 @@ Wollen Sie nun die neue Datenbank installieren?
<string name="patient_add">"Neuer Patient"</string>
<string name="db_download_and_setup">"Herunterladen und installieren"</string>
<string name="schedule_continue_indefinitely">"Soll dieser Einnahmeplan dauerhaft fortgeführt werden?"</string>
<string name="powder">"Puder"</string>
<string name="cream">"Creme"</string>
<plurals name="powder_units">
<item quantity="one">"Gramm"</item>
<item quantity="other">"Gramm"</item>
</plurals>
<plurals name="cream_units">
<item quantity="one">"Anwendung"</item>
<item quantity="other">"Anwendungen"</item>
</plurals>
<plurals name="generic_units">
<item quantity="one">"Einheit"</item>
<item quantity="other">"Einheiten"</item>
</plurals>
<string name="generic_presentation">"Generisch"</string>
<string name="notification_taken">"Eingenommen"</string>
</resources>
Loading

0 comments on commit 770d046

Please sign in to comment.