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

Attribute ignored for AlertDialog #164

Open
jlandrum opened this issue May 4, 2015 · 7 comments
Open

Attribute ignored for AlertDialog #164

jlandrum opened this issue May 4, 2015 · 7 comments

Comments

@jlandrum
Copy link

jlandrum commented May 4, 2015

When creating an AlertDialog using AlertDialog.Builder(), the default specified font is used, but fontPath is ignored. I've tried:

mContext = new ContextThemeWrapper(CalligraphyContextWrapper.wrap(c), R.style.Z70_AlertDialog);

mContext = CalligraphyContextWrapper.wrap(new ContextThemeWrapper(c, R.style.Z70_AlertDialog));

as well as using just ContextThemeWrapper and CalligraphyContextWrapper.

@chrisjenx
Copy link
Owner

Yeah its not setup to work out what is in the AlertDialog yet, You would need to define a custom view.
Sorry about that.

@Valinwolf
Copy link

It's 5, nearly 5 and a half, months later. Will this be implemented, and if so, do you have a progress report? I tried the same with ProgressDialog with the same outcome, so I assume that this is an issue with any form of built-in dialog?

@chrisjenx
Copy link
Owner

Well, I haven't tried but it should pick up what ever is defined in the theme supplied to it. I'm open to pull requests...
Or if you post a work around it makes it much easier to implement as it saves the grunt work.

@Valinwolf
Copy link

The current "hacks" available to dialogs are as follows:

  • Custom View
  • Adjusting a dialog theme with a specified system typeface and a ContextThemeWrapper.

While you have CalligraphyContextWrapper.wrap(), it does not work with Dialogs for some reason. I've been looking for a way to override the lack of capabilities, but I have not had much success. Right now I'm just using the system mono typeface, but I want to use a custom fixed-width font.

@chrisjenx
Copy link
Owner

Dialogs are weird as I think they create their own window which might not
inherit the same context wrapper. Suffice to say I have not looked into it
with much detail.

On Tue, 15 Sep 2015 18:52 Patrick Thomas notifications@github.com wrote:

The current "hacks" available to dialogs are as follows:

  • Custom View
  • Adjusting a dialog theme with a specified system typeface and a
    ContextThemeWrapper.

While you have CalligraphyContextWrapper.wrap(), it does not work with
Dialogs for some reason. I've been looking for a way to override the lack
of capabilities, but I have not had much success. Right now I'm just using
the system mono typeface, but I want to use a custom fixed-width font.


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

@Valinwolf
Copy link

You can change the font, just not to a custom one. It has to be a system font. I needed monospaced font for my ProgressDialog to make the formating look right, and the way I had to do it was a ContextThemeWrapper and a child style of Theme.Holo.Dialog using the "typeface" attribute set to the desired system font. However, for some reason using your wrapper and the custom attribute, doesn't work, as stated in this issue.

@lectricas
Copy link

any progress here? Maybe any guide how to set custom font usign this library in ProgressDialog

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

4 participants