MCPcopy Index your code
hub / github.com/SwiftyWang/AnimatePlayButton

github.com/SwiftyWang/AnimatePlayButton @1.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.6 ↗ · + Follow
33 symbols 65 edges 4 files 7 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AnimatePlayButton

play button animate to pause and stop button

Demo GIF

Import

Add it in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            ...
            maven { url "https://jitpack.io" }
        }
    }

Step 2. Add the dependency

    dependencies {
        compile 'com.github.SwiftyWang:AnimatePlayButton:1.4'
    }

How to use

Use it in xml

    <com.swifty.animateplaybutton.AnimatePlayButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:ap_animation_duration="250"
        app:ap_border_color="@color/colorPrimary"
        app:ap_button_background="@drawable/circle_primary_bg"
        app:ap_button_color="@android:color/black"
        app:ap_button_size="60dp"/>

Add click listener in Java/Kotlin

        animatePlayButton.setPlayListener(object : AnimatePlayButton.OnButtonsListener {
            override fun onPlayClick(playButton: View): Boolean {
                return true
            }

            override fun onPauseClick(pause: View): Boolean {
                return true
            }

            override fun onResumeClick(pause: View): Boolean {
                return true
            }

            override fun onStopClick(stop: View): Boolean {
                return true
            }
        })

Reference

xml attribute description default value
ap_animation_duration the transform animation duration 300(300ms)
ap_border_color the outside border color @android:color/holo_blue_bright
ap_button_background the button's background(need shape drawable) @drawable/circle_button_bg
ap_button_color the button's icon color @android:color/white
ap_button_size the button's size 42dp

Extension points exported contracts — how you extend this code

OnButtonsListener (Interface)
(no doc) [1 implementers]
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java

Core symbols most depended-on inside this repo

updateStatus
called by 4
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java
getDimens
called by 4
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java
calculatePauseGroupWidth
called by 3
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java
showAnimation
called by 2
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java
dismissAnimation
called by 2
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java
setPlayListener
called by 2
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java
initAttr
called by 1
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java
initView
called by 1
animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java

Shape

Method 27
Class 4
Enum 1
Interface 1

Languages

Java82%
Kotlin18%

Modules by API surface

animateplaybutton/src/main/java/com/swifty/animateplaybutton/AnimatePlayButton.java23 symbols
app/src/main/java/com/swifty/animateplaybutton/example/MainActivity.kt6 symbols
animateplaybutton/src/test/java/com/swifty/animateplaybutton/ExampleUnitTest.java2 symbols
animateplaybutton/src/androidTest/java/com/swifty/animateplaybutton/ExampleInstrumentedTest.java2 symbols

For agents

$ claude mcp add AnimatePlayButton \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact