Skip to content

Commit 38b0f36

Browse files
authored
Merge pull request #23 from rakesh1988/master
Modified TextFieldBoxes to accept Drawables for IconSignifier and endicon
2 parents c960844 + 1585f28 commit 38b0f36

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

textfieldboxes/src/main/java/studio/carbonylgroup/textfieldboxes/TextFieldBoxes.java

+14
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,14 @@ public void setIconSignifier(int resourceID) {
782782
} else removeIconSignifier();
783783
}
784784

785+
public void setIconSignifier(Drawable drawable) {
786+
787+
removeIconSignifier();
788+
this.iconImageButton.setImageDrawable(drawable);
789+
this.iconImageButton.setVisibility(View.VISIBLE);
790+
791+
}
792+
785793
/**
786794
* remove the icon by setting the visibility of the image view to View.GONE
787795
*/
@@ -800,6 +808,12 @@ public void setEndIcon(int resourceID) {
800808
} else removeEndIcon();
801809
}
802810

811+
public void setEndIcon(Drawable drawable) {
812+
removeEndIcon();
813+
this.endIconImageButton.setImageDrawable(drawable);
814+
this.endIconImageButton.setVisibility(View.VISIBLE);
815+
}
816+
803817
/**
804818
* remove the end icon by setting the visibility of the end image view to View.GONE
805819
*/

0 commit comments

Comments
 (0)