Fix download attachment

This commit is contained in:
J-Jamet
2020-01-13 10:05:34 +01:00
parent e413198d12
commit 50dc6cb0aa
5 changed files with 27 additions and 19 deletions

View File

@@ -136,7 +136,7 @@ class AttachmentFileNotificationService: LockNotificationService() {
}
val notificationIdDynamic = notificationId + downloadFileUris.indexOf(downloadFileUri)
notificationManager?.notify(notificationIdDynamic, builder.build())
startForeground(notificationIdDynamic, builder.build())
}
companion object {

View File

@@ -1,12 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="270"
android:toDegrees="270">
<shape
android:shape="ring"
android:innerRadiusRatio="2.5"
android:thickness="2dp"
android:useLevel="true">
<solid android:color="?attr/colorAccent" />
</shape>
</rotate>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke
android:width="1.5dp"
android:color="?attr/editTextColor"/>
</shape >

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="270"
android:toDegrees="270">
<shape
android:shape="ring"
android:innerRadiusRatio="2.5"
android:thickness="2dp"
android:useLevel="true">
<solid android:color="?attr/colorAccent" />
</shape>
</rotate>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/item_attachment_container"
@@ -31,9 +32,9 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="6dp"
android:layout_width="36dp"
android:layout_height="36dp"
android:padding="6dp"
android:src="@drawable/ic_file_download_white_24dp"
android:tint="?attr/colorAccent" />
<ProgressBar
@@ -44,8 +45,8 @@
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginBottom="4dp"
android:max="100"
android:progress="60"
android:progressDrawable="@drawable/background_progress_circle" />
android:progressDrawable="@drawable/foreground_progress_circle"
android:background="@drawable/background_progress_circle" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -424,7 +424,7 @@
<string name="contribute">Contribute</string>
<string name="download_attachment">Download %1$s</string>
<string name="download_initialization">Initializing…</string>
<string name="download_progression">In progress : %1$d\%</string>
<string name="download_progression">In progress : %1$d\%%</string>
<string name="download_finalization">Finalizing…</string>
<string name="download_complete">Complete !</string>
<!-- Encryption Algorithms -->