-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Design Support Library support? #202
Comments
@nealsanche until google do sensible things like inflate layouts like they should be then it's very difficult to intercept anything like this, they do dirty things like creating TextViews pragmatically. That said it is possible to "intercept" the I would suggest you raise a bug at b.google.com and ask them to expose Typeface support on the widget. Once they are exposed, its pretty trivial to enable |
I think @chrisjenx meant http://b.android.com. But... no need to raise another issue! I've created a Feature/Enhancement Request already. Please star the issue. |
@chrisjenx Is this the same issue that I'm having with Calligraphy not setting the typeface when I define a fontPath item in my style that i pass to NavigationView.setItemTextAppearance()? The only way I seem to be able to modify the font of items in my NavigationView seems to be by changing the default font I set during Calligraphy's initialization. Just so it's clear, I'm subclassing NavigationView, and then in each constructor I call my own method called init(). inside init() I do the following: setItemTextAppearance(R.style.my_style_with_a_fontPath_item); If so, I'll open another enhancement ticket to get the typeface of the menu items exposed like the ticket that was made for CollapsingToolbarLayout. Chris Banes already assigned that one to himself. |
@dphillipsprosper MenuItems aren't handled at the moment regardless, I would need to look into how |
Hmm, that's good to know about MenuItems not being handled. But they seem to just be a backing dataitem for an adapter. I dug into the So if I understand how Calligraphy works, the |
@don, yes the CalligraphyLayoutInflater will be passed to the View. The If there is no style/attribute defining the menuitem inside the xml then It's a pain. On Fri, 4 Sep 2015 at 17:51 Don Phillips [email protected] wrote:
|
Ahh, so I'm sunk, because the XML layout that's being inflated inside the |
It might have a style applied to it though. In that case you can just On Fri, 4 Sep 2015 23:53 Don Phillips [email protected] wrote:
|
Found the XML for the item. It does have a textAppearance set, but it's set to a style directly rather than an attribute, so no go on the override there I think. But at least this means I can submit an enhancement (make the textAppearance reference a theme attribute rather than a style) and make our lives easier. Here's the XML for the NavigationMenuItemView, in case I'm incorrect: <android.support.design.internal.NavigationMenuItemView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:drawablePadding="@dimen/design_navigation_icon_padding"
android:gravity="center_vertical|start"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> |
Well in theory if you override On Tue, 8 Sep 2015 at 17:42 Don Phillips [email protected] wrote:
|
So looks like |
Looks like the NavigationView menu items are working now with the Calligraphy library and menu items display the correct font. At least with the latest version 23.1.1. |
An alternative method for setting the typeface for the CollapsingToolbarLayout for anyone else that was wondering: |
Can anyone confirm whether or not expandedTitleTextAppearance is playing nice with Calligraphy at this time? I'm not seeing the font change properly, but the comments on this bug make me think Chris and touchbee are indicating it does play nice now. Trying to deduce what I'm missing. I have a style with a fontPath being assigned as the expandedTitleTextAppearance but it only respects the size color, and not the font. |
IT does not, we only look for `textAppearance` at the moment.
…On Mon, 30 Jan 2017 at 10:13 Kusand ***@***.***> wrote:
Can anyone confirm whether or not *expandedTitleTextAppearance* is
playing nice with Calligraphy at this time? I'm not seeing the font change
properly, but the comments on this bug make me think Chris and touchbee are
indicating it does play nice now. Trying to deduce what I'm missing. I have
a style with a *fontPath* being assigned as the
*expandedTitleTextAppearance* but it only respects the size color, and
not the font.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#202 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHRsSpNs96NEgQJPqYx4h5pjPYjHPvwks5rXhpCgaJpZM4FxTYE>
.
|
Drat. Would that be desirable to patch in? I can probably get some bandwidth to do so, and clearance to contribute. |
Yeah sure, it would be better as a plugin, we are working on making this
much more flexible at the moment.
…On Mon, 30 Jan 2017 at 10:18 Kusand ***@***.***> wrote:
Drat. Would that be desirable to patch in? I can probably get some
bandwidth to do so, and clearance to contribute.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#202 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHRsQiqbFzaot__9C5iwhszm1f9Ns-5ks5rXhtYgaJpZM4FxTYE>
.
|
I've noticed the fonts in the CollapsingToolbarLayout in particular, the Title attribute, isn't set. I've had to resort to something ugly like the following to get it to set the font on it:
I'd much rather have Calligraphy handle this for me in a nice, unseen, magical way as per usual. I was hoping that the following would just work:
And then in the layout:
But, sadly, it doesn't set the font.
The text was updated successfully, but these errors were encountered: