Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change gravity of text #114

Closed
arthtilva opened this issue Oct 12, 2018 · 1 comment
Closed

Change gravity of text #114

arthtilva opened this issue Oct 12, 2018 · 1 comment

Comments

@arthtilva
Copy link

arthtilva commented Oct 12, 2018

We are not able to change the gravity of the text, right now its centred. If we can update that it would be great relief and usable. (if not possible for attributes its fine, but i have imported code and used java files in the code so i can update that also.)

ShawnLin013 added a commit that referenced this issue Nov 17, 2018
@ShawnLin013
Copy link
Owner

Hi @arthtilva,

Thank you for your suggestion. 🙏

This feature is supported at v2.4.7. Please try the following code snippet.

int align = NumberPicker.CENTER; // NumberPicker.LEFT, NumberPicker.CENTER, NumberPicker.RIGHT
numberPicker.setSelectedTextAlign(align);
numberPicker.setTextAlign(align);

or

app:np_selectedTextAlign="selectedTextAlignCenter" // selectedTextAlignLeft, selectedTextAlignCenter, selectedTextAlignRight
app:np_textAlign="textAlignCenter" // textAlignLeft, textAlignCenter, textAlignRight

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

No branches or pull requests

2 participants