avast/android-styled-dialogs

Custom typefaces

ZacSweers opened this issue · 9 comments

Would you guys be open to a pull request allowing for custom typefaces?

You mean different fonts than in Material design? I'm not 100% sure, but I guess another method in the builder woudn't hurt. Just please don't copy any font files into the library.

yeah, an example being an app uses a specific font throughout their app for theme/brand purposes. Being able to set custom typefaces for a dialog would be really important to apps that do this. This wouldn't add any font files, just basically adding support via a setTypeface() method in the builder :)

Hi, we discussed it and we think it's better to do it in styles than in the builder. You typically want to change typeface in all dialogs, not just in one. And you might want to set different typeface to title, message, buttons etc. and that would complicate the builder too much.

We propose that you create a custom attribute for setting typeface. You put it to styles of all text widgets like SDL.TextView.Title, SDL.Button etc. Link Roboto font there which is already present in the library.

Then in your app you can override these styles and change typeface. Then we will be happy to accept your PR :)

Sounds good to me. Sorry about the late response, been a little busy this week. I’ll try to submit a pull request in the next couple days!

-- 
Henri Sweers
Sent with Airmail

On February 12, 2015 at 12:50:36 AM, David Vavra (notifications@github.com) wrote:

Hi, we discussed it and we think it's better to do it in styles than in the builder. You typically want to change typeface in all dialogs, not just in one. And you might want to set different typeface to title, message, buttons etc. and that would complicate the builder too much.

We propose that you create a custom attribute for setting typeface. You put it to styles of all text widgets like SDL.TextView.Title, SDL.Button etc. Link Roboto font there which is already present in the library.

Then in your app you can override these styles and change typeface. Then we will be happy to accept your PR :)


Reply to this email directly or view it on GitHub.

Need to remove typeface from this library, because if you need to use custom typeface in app - you can use Calligraphy globally, but if you already use Calligraphy, this makes overkill.

Not everyone uses calligraphy, nor is it a reason to exclude features from
a library.
On Sat, Apr 18, 2015 at 2:34 PM imShara notifications@github.com wrote:

Need to remove typeface from this library, because if you need to use
custom typeface in app - you can use Calligraphy
https://github.com/chrisjenx/Calligraphy globally, but if you already
use Calligraphy, this makes overkill.


Reply to this email directly or view it on GitHub
#101 (comment)
.

@hzsweers Any updates regarding the PR?

Ah, no. I'd forgotten about it, but also saw this library wasn't really under development anymore so I never followed up. I just used material-dialogs instead

*thought this library