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.1
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusnadin committed Jun 13, 2017
1 parent dcdf7b0 commit 18e4b51
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .idea/modules.xml

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

1 change: 0 additions & 1 deletion app/src/main/java/com/ebanx/swipebutton/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ protected void onCreate(Bundle savedInstanceState) {

swipeButton.setBackground(ContextCompat.getDrawable(this, R.drawable.shape_button2));
swipeButton.setSlidingButtonBackground(ContextCompat.getDrawable(this, R.drawable.shape_rounded2));
swipeButton.setDisabledDrawable(ContextCompat.getDrawable(this, R.drawable.ic_lock_outline_black_24dp));
swipeButton.setText("lala");
swipeButton.setInnerTextPadding(10, 10, 10, 10);

Expand Down
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="disabled"
app:initial_state="enabled"
/>

</LinearLayout>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.btkelly:gnag:1.3.2'
Expand Down
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.5.0'
version = '0.5.1'
group = 'com.ebanx'

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

licenses {
license {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr, int def
layoutParamsButton.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
layoutParamsButton.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);

swipeButton.setImageDrawable(enabledDrawable);

addView(swipeButton, layoutParamsButton);

active = true;
Expand All @@ -194,6 +196,8 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr, int def
layoutParamsButton.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
layoutParamsButton.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);

swipeButton.setImageDrawable(disabledDrawable);

addView(swipeButton, layoutParamsButton);

active = false;
Expand All @@ -213,8 +217,6 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr, int def
swipeButton.setBackground(ContextCompat.getDrawable(context, R.drawable.shape_button));
}

swipeButton.setImageDrawable(disabledDrawable);

float buttonLeftPadding = typedArray.getDimension(
R.styleable.SwipeButton_button_left_padding, 0);
float buttonTopPadding = typedArray.getDimension(
Expand Down

0 comments on commit 18e4b51

Please sign in to comment.