adp-path-morph-play-to-pause icon indicating copy to clipboard operation
adp-path-morph-play-to-pause copied to clipboard

Small line in center of playbutton state

Open locomain opened this issue 10 years ago • 8 comments

the title says it al. i didnt really look in to the source just yet.

locomain avatar Apr 11 '15 21:04 locomain

Its problem with pause_bar_height from resources, on some devices with density not full number (like 1.5, 1.3 etc) show little line like this: play_btn

On devices with density like 2.0, 3.0 etc its ok.

Try combine with values: pause_bar_height, pause_bar_distance, pause_bar_width.

This values i tested and works ok:

<dimen name="pause_bar_width">8dp</dimen>
<dimen name="pause_bar_distance">6dp</dimen>
<dimen name="pause_bar_height">24dp</dimen>

kenumir avatar May 27 '15 12:05 kenumir

Is there any news on this? I made a standalone version which scales accordingly to the bounds and does not need any resources and sometimes I have this thin line as well: https://github.com/Ph1b/MaterialAudiobookPlayer/blob/master/audiobook/src/main/java/de/ph1b/audiobook/uitools/PlayPauseDrawable.java

PaulWoitaschek avatar Jul 12 '15 16:07 PaulWoitaschek

I tried to change the pause_bar_height value but nothing is changing ... I am using a Nexus 6 which should have also not full number ( I think 3.6 ). @kenumir could you help me?

pimato avatar Aug 27 '15 07:08 pimato

Try change drawable size. Drawing animations depends from drawable size and dimens from XML.

kenumir avatar Aug 27 '15 14:08 kenumir

so any one found a solution , I have the same probleme tested on LG G2 4.4.2

diabloo avatar Nov 05 '15 23:11 diabloo

Same here on LG Nexus 5, thought was a shadow from the mPaint object but after clear seems that it wasn't.

Anyone did found out ?

maxoumime avatar Jan 17 '16 21:01 maxoumime

How about just modifying the barDist float in PlayPauseDrawable's Draw(Canvas canvas) override? I substracted one pixel and the gap is gone.

// The current distance between the two pause bars.
float barDist = Lerp(mPauseBarDistance, 0, progressAdjusted)  - 1;

oli-g-sk avatar Apr 18 '16 12:04 oli-g-sk

@oli-g-sk your solution worked perfectly! thanks!

Pranoy1c avatar May 30 '16 06:05 Pranoy1c