cleveroad / musicbobber Goto Github PK
View Code? Open in Web Editor NEWAwesome Audio Widget for any Android Music App
Home Page: https://www.cleveroad.com
License: MIT License
Awesome Audio Widget for any Android Music App
Home Page: https://www.cleveroad.com
License: MIT License
I find a little bug in your code.
when you use windowManager.updateViewLayout(playPauseButton,params);maybe have an erro:
java.lang.IllegalArgumentException: View=com.cleveroad.audiowidget.PlayPauseButton{42fbbb50 V.ED.... ......I. 0,0-360,360} not attached to window manager
private void updatePlayPauseButtonPosition() {
WindowManager.LayoutParams widgetParams = (WindowManager.LayoutParams) expandCollapseWidget.getLayoutParams();
WindowManager.LayoutParams params = (WindowManager.LayoutParams) playPauseButton.getLayoutParams();
if (expandCollapseWidget.expandDirection() == ExpandCollapseWidget.DIRECTION_RIGHT) {
params.x = (int) (widgetParams.x - radius);
} else {
params.x = (int) (widgetParams.x + widgetWidth - widgetHeight - radius);
}
params.y = widgetParams.y;
windowManager.updateViewLayout(playPauseButton, params);
if (onWidgetStateChangedListener != null) {
onWidgetStateChangedListener.onWidgetPositionChanged((int) (params.x + widgetHeight), (int) (params.y + widgetHeight));
}
}
I suggest to add onClick/onLongClick listeners to albumCover, or on Disk-like image to collapse
Or custom actions
Hi @Iojjj
i have little issue on changing the play/pause button on when my app onPause(), what i need.? i want to change the play/pause button on depending on whether the music is play or pause on when my app is going on a onPause(), i just show audioWidget onPause() like @Override protected void onPause() { super.onPause(); audioWidget.show(100, 100); }
and i maintain audioWidget.controller() click separately.
so how can i change play/pause icon as per my requirement.
also when i call audioWidget.hide() in onResume() of activity it will crash app and my crash log like Process: com.example.gaurav.myapplication, PID: 23850 java.lang.IllegalArgumentException: View=com.cleveroad.audiowidget.PlayPauseButton{27b58e94 V.ED.... ......I. 0,0-240,240} not attached to window manager at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:421) at android.view.WindowManagerGlobal.updateViewLayout(WindowManagerGlobal.java:305) at android.view.WindowManagerImpl.updateViewLayout(WindowManagerImpl.java:74) at com.cleveroad.audiowidget.AudioWidget.updatePlayPauseButtonPosition(AudioWidget.java:421) at com.cleveroad.audiowidget.AudioWidget.access$6500(AudioWidget.java:31) at com.cleveroad.audiowidget.AudioWidget$ExpandCollapseWidgetCallback.onMoved(AudioWidget.java:653) at com.cleveroad.audiowidget.TouchManager$StickyEdgeAnimator.lambda$new$1(TouchManager.java:389) at com.cleveroad.audiowidget.TouchManager$StickyEdgeAnimator.access$lambda$0(TouchManager.java) at com.cleveroad.audiowidget.TouchManager$StickyEdgeAnimator$$Lambda$1.onAnimationUpdate(Unknown Source) at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1283) at android.animation.ValueAnimator.animationFrame(ValueAnimator.java:1207) at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1248) at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:659) at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:682) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:800) at android.view.Choreographer.doCallbacks(Choreographer.java:603) at android.view.Choreographer.doFrame(Choreographer.java:571) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5576) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
Thanks.
is it possible use a bitmap instead of a Drawable as album image?
While dragging the bubble view its movement is not as smooth as facebook chat heads or BuMp player. Is there any way to make the movement much more natural??
Great, I ask where can I download
hey and thanks for such a beautiful widget
i have a background recorder app which will start recording voice in background using my custom shortcut(self made)
as i interested in your product i want to know is there any chance to use it for my situation?
I really do not know how to use this library in Android 8.0. "" Permission to crunch an app that does not work. Any help in this regard will be appreciated.
I click on the album on the desktop, jump to the app, and the Bobber will hide.Then the Bobberis no longer displayed,i don't know why
When i press my media player button from play to pause or pause to play i also want to change the widget play/pause button. How to do that?
Hi Guys,
We are trying to use the bobber in one of our android app and it has been great. The only part we need is a seekbar using which we can forward or move backward in the song.
Is there any way to achieve that or is there any enhancement you are thinking about? Can you guide us with that if there is any way to do that?
Regards
Hasan Sajora
Very nice plugin I am implement on my project but there are no function show current position nd duration time
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.