android-slidr icon indicating copy to clipboard operation
android-slidr copied to clipboard

Not able to hide the euro sign

Open vaibhav1007 opened this issue 7 years ago • 3 comments

No method to change or hide the euro symbol

vaibhav1007 avatar Jul 03 '17 12:07 vaibhav1007

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.

snc001 avatar Jul 18 '17 22:07 snc001

my solution:

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

boomsya avatar Jul 19 '17 08:07 boomsya

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

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

aslami-dev avatar Feb 16 '18 10:02 aslami-dev