New animated PlayPauseDrawable
This commit is contained in:
parent
e39162c126
commit
a27e5c6379
20 changed files with 282 additions and 246 deletions
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="rotation"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="90" />
|
||||
</set>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="pathData"
|
||||
android:valueFrom="@string/drawable_vector_pause_left"
|
||||
android:valueTo="@string/drawable_vector_resume_left"
|
||||
android:valueType="pathType" />
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="pathData"
|
||||
android:valueFrom="@string/drawable_vector_pause_right"
|
||||
android:valueTo="@string/drawable_vector_resume_right"
|
||||
android:valueType="pathType" />
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="rotation"
|
||||
android:valueFrom="90"
|
||||
android:valueTo="180" />
|
||||
</set>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="pathData"
|
||||
android:valueFrom="@string/drawable_vector_resume_left"
|
||||
android:valueTo="@string/drawable_vector_pause_left"
|
||||
android:valueType="pathType" />
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="pathData"
|
||||
android:valueFrom="@string/drawable_vector_resume_right"
|
||||
android:valueTo="@string/drawable_vector_pause_right"
|
||||
android:valueType="pathType" />
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group
|
||||
android:name="rotationGroup"
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:name="left"
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="@string/drawable_vector_pause_left" />
|
||||
<path
|
||||
android:name="right"
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="@string/drawable_vector_pause_right" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:constantSize="true">
|
||||
|
||||
<item
|
||||
android:id="@+id/pressed_selected"
|
||||
android:state_selected="true"
|
||||
android:state_pressed="true"
|
||||
android:drawable="@drawable/ic_resume" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_resume_state"
|
||||
android:drawable="@drawable/ic_resume"
|
||||
android:state_selected="true" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_pause_state"
|
||||
android:drawable="@drawable/ic_pause" />
|
||||
|
||||
<transition
|
||||
android:fromId="@id/pressed_selected"
|
||||
android:toId="@id/action_resume_state"
|
||||
android:drawable="@drawable/ic_pause_to_ic_resume" />
|
||||
|
||||
<transition
|
||||
android:fromId="@id/pressed_selected"
|
||||
android:toId="@id/action_pause_state"
|
||||
android:drawable="@drawable/ic_resume_to_ic_pause" />
|
||||
|
||||
</animated-selector>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_pause">
|
||||
<target
|
||||
android:name="rotationGroup"
|
||||
android:animation="@anim/drawable_pause_to_resume_group" />
|
||||
<target
|
||||
android:name="left"
|
||||
android:animation="@anim/drawable_pause_to_resume_left" />
|
||||
<target
|
||||
android:name="right"
|
||||
android:animation="@anim/drawable_pause_to_resume_right" />
|
||||
</animated-vector>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group
|
||||
android:name="rotationGroup"
|
||||
android:pivotX="12"
|
||||
android:pivotY="12"
|
||||
android:rotation="90">
|
||||
<path
|
||||
android:name="left"
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="@string/drawable_vector_resume_left" />
|
||||
<path
|
||||
android:name="right"
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="@string/drawable_vector_resume_right" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/ic_resume">
|
||||
<target
|
||||
android:name="rotationGroup"
|
||||
android:animation="@anim/drawable_resume_to_pause_group" />
|
||||
<target
|
||||
android:name="left"
|
||||
android:animation="@anim/drawable_resume_to_pause_left" />
|
||||
<target
|
||||
android:name="right"
|
||||
android:animation="@anim/drawable_resume_to_pause_right" />
|
||||
</animated-vector>
|
||||
|
|
@ -9,11 +9,11 @@
|
|||
android:id="@+id/file_path"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
|
|
@ -23,61 +23,62 @@
|
|||
android:fontFamily="sans-serif"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/file_format"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/track_length"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bitrate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sampling_rate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:fontFamily="sans-serif"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -46,4 +46,11 @@ http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
|
|||
-->
|
||||
<dimen name="widget_margin">8dp</dimen>
|
||||
<dimen name="app_widget_small_artwork_height">64dp</dimen>
|
||||
|
||||
<dimen name="pause_bar_width">5dp</dimen>
|
||||
<dimen name="pause_bar_distance">4dp</dimen>
|
||||
<dimen name="pause_bar_height">14dp</dimen>
|
||||
|
||||
<dimen name="fab_icon_bound_width">32dp</dimen>
|
||||
<dimen name="fab_icon_bound_height">36dp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="drawable_vector_pause_left">M6,5 l4,0 0,14 -4,0 z</string>
|
||||
<string name="drawable_vector_pause_right">M14,5 l4,0 0,14 -4,0 z</string>
|
||||
<string name="drawable_vector_resume_left">M12,5 l0,0 0,11 -7,0 z</string>
|
||||
<string name="drawable_vector_resume_right">M12,5 l0,0 7,11 -7,0 z</string>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue