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

Changing texts' typeface #61

Open
bluemix opened this issue Dec 15, 2015 · 3 comments
Open

Changing texts' typeface #61

bluemix opened this issue Dec 15, 2015 · 3 comments

Comments

@bluemix
Copy link

bluemix commented Dec 15, 2015

I am wondering if there is a way to change the typefaces of all the texts that appear in the dialogs.
Thanks in advance.

@fengdai
Copy link
Owner

fengdai commented Dec 15, 2015

For now, there isn't a simple API to approach this if the typeface you want to set isn't the android's built-in typeface.

But your can implement your own dialog layout (You can copy and modify based on this file: https://github.com/fengdai/AlertDialogPro/blob/master/alertdialogpro-theme-material/src/main/res/layout/adp_alert_dialog_material.xml). And replace all TextView/Button to CustomTextView/CustomButton which use your typeface (http:https://stackoverflow.com/questions/29497464/best-way-to-assign-font-typeface-to-textview). Then apply the layout to AlertDialogPro with adpLayout attribute.

<item name="adpLayout">@layout/your_alert_dialog_layout</item>

@bluemix
Copy link
Author

bluemix commented Dec 15, 2015

ah, I see now 👍
thanks a lot @fengdai for your quick reply.

@fengdai
Copy link
Owner

fengdai commented Dec 15, 2015

You're welcome.

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