Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9cb5b4c2 authored by ztenghui's avatar ztenghui
Browse files

Use AnimatedVectorDrawable for progress bar.

Change-Id: I419197ef38a611757f27ca3192350ad4bd403875
parent 66d3d8a0
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright (C) 2014 The Android Open Source Project

     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

          http://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.
-->

<set xmlns:android="http://schemas.android.com/apk/res/android" >

    <objectAnimator
        android:duration="1333"
        android:interpolator="@interpolator/trim_start_interpolator"
        android:propertyName="trimPathStart"
        android:repeatCount="-1"
        android:valueFrom="0"
        android:valueTo="0.75"
        android:valueType="floatType" />
    <objectAnimator
        android:duration="1333"
        android:interpolator="@interpolator/trim_end_interpolator"
        android:propertyName="trimPathEnd"
        android:repeatCount="-1"
        android:valueFrom="0"
        android:valueTo="0.75"
        android:valueType="floatType" />
    <objectAnimator
        android:duration="1333"
        android:interpolator="@android:anim/linear_interpolator"
        android:propertyName="trimPathOffset"
        android:repeatCount="-1"
        android:valueFrom="0"
        android:valueTo="0.25"
        android:valueType="floatType" />

</set>
 No newline at end of file
+8 −6
Original line number Diff line number Diff line
@@ -14,9 +14,11 @@
     limitations under the License.
-->

<material-progress xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?attr/colorControlActivated"
    android:width="76dp"
    android:height="76dp"
    android:thickness="6.3dp"
    android:innerRadius="30.1dp" />
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/vector_drawable_progress_bar_large" >

    <target
        android:name="progressBar"
        android:animation="@anim/progress_indeterminate_material" />

</animated-vector>
+7 −6
Original line number Diff line number Diff line
@@ -13,10 +13,11 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/vector_drawable_progress_bar_medium" >

<material-progress xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?attr/colorControlActivated"
    android:width="48dp"
    android:height="48dp"
    android:thickness="4dp"
    android:innerRadius="19dp" />
    <target
        android:name="progressBar"
        android:animation="@anim/progress_indeterminate_material" />

</animated-vector>
 No newline at end of file
+8 −6
Original line number Diff line number Diff line
@@ -14,9 +14,11 @@
     limitations under the License.
-->

<material-progress xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?attr/colorControlActivated"
    android:width="16dp"
    android:height="16dp"
    android:thickness="1.3dp"
    android:innerRadius="6.3dp" />
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/vector_drawable_progress_bar_small" >

    <target
        android:name="progressBar"
        android:animation="@anim/progress_indeterminate_material" />

</animated-vector>
+45 −0
Original line number Diff line number Diff line
<!--
 Copyright (C) 2014 The Android Open Source Project

     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

          http://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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android" >

    <size
        android:height="76dp"
        android:width="76dp" />

    <viewport
        android:viewportHeight="48"
        android:viewportWidth="48" />

    <group
        android:name="root"
        android:scaleX="1.0"
        android:scaleY="1.0"
        android:translateX="24.0"
        android:translateY="24.0" >
        <path
            android:name="progressBar"
            android:fill="#00000000"
            android:pathData="M0, 0 m 0, -19 a 19,19 0 1,1 0,38 a 19,19 0 1,1 0,-38"
            android:stroke="?attr/colorControlActivated"
            android:strokeLineCap="round"
            android:strokeLineJoin="miter"
            android:strokeWidth="4"
            android:trimPathEnd="0"
            android:trimPathOffset="0"
            android:trimPathStart="0" />
    </group>

</vector>
 No newline at end of file
Loading