alexjlockwood / adp-path-morph-play-to-pause

Play-to-pause path morphing example
MIT License
348 stars 40 forks source link

Small line in center of playbutton state #2

Open locomain opened 9 years ago

locomain commented 9 years ago

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

kenumir commented 9 years ago

Its problem with _pause_barheight 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_barheight, _pause_bardistance, _pause_barwidth.

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>
PaulWoitaschek commented 9 years ago

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

pimato commented 9 years ago

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?

kenumir commented 9 years ago

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

diabloo commented 9 years ago

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

maxoumime commented 8 years ago

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 ?

oli-g-sk commented 8 years ago

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;
Pranoy1c commented 8 years ago

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