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

Not able to hide the euro sign #3

Open
vaibhav1007 opened this issue Jul 3, 2017 · 3 comments
Open

Not able to hide the euro sign #3

vaibhav1007 opened this issue Jul 3, 2017 · 3 comments

Comments

@vaibhav1007
Copy link

No method to change or hide the euro symbol

@snc001
Copy link

snc001 commented Jul 18, 2017

I'm not sure what you mean here - though I can say that if you're trying to hide the EURO sign you have to use the text formatter.

EG - slidr.setTextFormatter(new Slidr.TextFormatter() {
@OverRide
public String format(float value) {
return String.format(java.util.Locale.US, "%.1f %%", value);
}
});

this will show 1 decimal place float with % - 6.9% for example on the actual slider.

But if you were hoping to see the changes reflect on the XML preview - then you won't be able to see changes but only whatever the stock is out of package.

@boomsya
Copy link

boomsya commented Jul 19, 2017

my solution:

yourage.setTextFormatter(new Slidr.TextFormatter() {
	@Override
	public String format(float value) {
		return String.valueOf((int) value) + " " + getString(R.string.years);
	}
});

@aslami-dev
Copy link

slidr.setTextFormatter(new Slidr.TextFormatter() {
@OverRide
public String format(float value) {

            return String.valueOf((int) value)+"s";
        }
    });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants