mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix progress for Android < 5
This commit is contained in:
13
app/src/main/res/drawable-v21/foreground_progress_circle.xml
Normal file
13
app/src/main/res/drawable-v21/foreground_progress_circle.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?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>
|
||||
@@ -7,6 +7,6 @@
|
||||
android:innerRadiusRatio="2.5"
|
||||
android:thickness="2dp"
|
||||
android:useLevel="true">
|
||||
<solid android:color="?attr/colorAccent" />
|
||||
<solid android:color="@color/orange" />
|
||||
</shape>
|
||||
</rotate>
|
||||
@@ -26,8 +26,7 @@
|
||||
android:gravity="end"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_attachment_icon"
|
||||
>
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_attachment_icon" >
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/item_attachment_size"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -63,11 +62,9 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
style="@style/KeepassDXStyle.ProgressBar.Circle"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:max="100"
|
||||
android:progress="60"
|
||||
android:progressDrawable="@drawable/foreground_progress_circle"
|
||||
android:background="@drawable/background_progress_circle" />
|
||||
android:progress="60" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -328,4 +328,10 @@
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<!-- Progress bar -->
|
||||
<style name="KeepassDXStyle.ProgressBar.Circle" parent="Widget.AppCompat.ProgressBar.Horizontal">
|
||||
<item name="android:progressDrawable">@drawable/foreground_progress_circle</item>
|
||||
<item name="android:background">@drawable/background_progress_circle</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user