medyo / Fancybuttons

Icons, Borders, Radius ... for Android buttons
1.77k stars 397 forks source link

Is it possible to set the icon to the end of the button #101

Closed CristianSarac closed 6 years ago

CristianSarac commented 6 years ago

A simple question I know you can set the Icon to Right,Left,Top,Bottom of the textView my question is if it is possible to set the Icon to the end of the Button ?

pishguy commented 6 years ago

@CristianSarac for supporting RTL or LTR?

CristianSarac commented 6 years ago

Basically i want to achieve something like this button

pishguy commented 6 years ago

@CristianSarac ok, let me to check source code

jbuote commented 6 years ago

Any update on this? I would like to do the same thing so I started looking through issues to see if there was a way or if I needed to try to add that ability myself. I Found this issue. If it's in process, I won't bother working on it. If it's not in process, I might take a swing at it, and if I get it to work, I could make a PR for it if you like.

Ideally (for my case anyway) having more position options would work

Current options:

/**
     * Tags to identify icon position
     */
    public static final int POSITION_LEFT       = 1;
    public static final int POSITION_RIGHT      = 2;
    public static final int POSITION_TOP        = 3;
    public static final int POSITION_BOTTOM     = 4;

The above would remain working as they do now. Left, right, top, bottom of text. Add:

POSITION_START = 5;
POSITION_END = 6;

These 2 would indicate to place the icon at start or end of control instead of in relation to the text. Text should still be able to have gravity. (center, start, end etc...)

Anyway, Is there any update?