Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Commit

Permalink
Version 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leandroBorgesFerreira committed Jun 12, 2017
1 parent 82a219a commit f8e1fd9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
app:button_top_padding="20dp"
app:button_bottom_padding="20dp"
app:button_background="@drawable/shape_button"
app:initial_state="enabled"
app:initial_state="disabled"
/>

</LinearLayout>
4 changes: 2 additions & 2 deletions swipe-button/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'gnag'

version = '0.4.2'
version = '0.5.0'
group = 'com.ebanx'

android {
Expand Down Expand Up @@ -103,7 +103,7 @@ install {
packaging 'aar'
groupId 'com.ebanx'
artifactId 'swipe-button'
version '0.4.2'
version '0.5.0'

licenses {
license {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class SwipeButton extends RelativeLayout {
private ImageView swipeButton;
private float initialX;
private boolean active;
private int initialButtonWidth;
private TextView centerText;
private ViewGroup background;

Expand Down Expand Up @@ -270,7 +269,6 @@ public boolean onTouch(View v, MotionEvent event) {
collapseButton();
} else {
if (swipeButton.getX() + swipeButton.getWidth() > getWidth() * 0.85) {
initialButtonWidth = swipeButton.getWidth();
expandButton();
} else {
moveButtonBack();
Expand Down Expand Up @@ -355,7 +353,7 @@ public void onAnimationUpdate(ValueAnimator animation) {
private void collapseButton() {
final ValueAnimator widthAnimator = ValueAnimator.ofInt(
swipeButton.getWidth(),
initialButtonWidth);
swipeButton.getHeight());

widthAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
Expand Down

0 comments on commit f8e1fd9

Please sign in to comment.