forked from upstream-mirrors/OpenTracks
Fix force close on stop button for older devices (#393)
* correct thread handling in ButtonDelay Discovered in #390 for devices with API Level 25. Not fixing the whole issue, but a first step. * fix #390 crash when stopping for older devices The VectorDrawable ic_button_stop.xml referenced from withing the AnimatedVectorDrawable ic_button_stop_anim.xml was a problem for older devices. Now the VectorDrawable is expanded (duplicated) inside the AnimatedVectorDrawable. Now it is working. Even with the animation.
This commit is contained in:
@@ -1,5 +1,40 @@
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_button_stop" >
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
android:width="82dp"
|
||||
android:height="82dp"
|
||||
android:viewportWidth="125"
|
||||
android:viewportHeight="125">
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M2.516,63.008a60.239,59.73 134.879,1 0,119.968 -1.017a60.239,59.73 134.879,1 0,-119.968 1.017z"
|
||||
android:strokeWidth="5.03194237"
|
||||
android:strokeAlpha="1"
|
||||
android:strokeColor="#555555" />
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#484848"
|
||||
android:pathData="M62.5,62.5m-50,0a50,50 0,1 1,100 0a50,50 0,1 1,-100 0"
|
||||
android:strokeWidth="6.9172821"
|
||||
android:strokeAlpha="1"
|
||||
android:strokeColor="#00000000" />
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M53.02,54.02h17.46v17.46h-17.46z"
|
||||
android:strokeWidth="1.04023623"
|
||||
android:strokeAlpha="1"
|
||||
android:strokeColor="#414141" />
|
||||
<path android:name="fade_out_circle"
|
||||
android:pathData="M62.5,62.5m-0,-62a50,50 0,1 1,-0 123a50,50 0,1 1,-0 -123"
|
||||
android:fillAlpha="0.0"
|
||||
android:fillColor="#a31a1f">
|
||||
</path>
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
<target
|
||||
android:name="fade_out_circle"
|
||||
android:animation="@animator/button_animator" />
|
||||
|
||||
Reference in New Issue
Block a user